I hereby claim:
- I am fruchtose on github.
- I am fruchtose (https://keybase.io/fruchtose) on keybase.
- I have a public key whose fingerprint is AB82 A139 D9C2 94CE A6CB A25B 9A5A D631 4204 274A
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| unless File.exist?('Gemfile') | |
| File.write('Gemfile', <<-GEMFILE) | |
| source 'https://rubygems.org' | |
| gem 'rails', github: 'rails/rails' | |
| gem 'arel', github: 'rails/arel' | |
| gem 'pg' | |
| GEMFILE | |
| system 'bundle' | |
| end |
| var weibo = module.exports = | |
| oauthModule.submodule('weibo') | |
| // ... | |
| .get('entryPath', | |
| 'the link a user follows, whereupon you redirect them to the 3rd party OAuth provider dialog - e.g., "/auth/facebook"') | |
| // ... | |
| .get('callbackPath', | |
| 'the callback path that the 3rd party OAuth provider redirects to after an OAuth authorization result - e.g., "/auth/facebook/callback"') | |
| // ... | |
| .step('fetchOAuthUser') |
| var oauthModule = require('./oauth2') | |
| , querystring= require('querystring') | |
| , request = require('request'); | |
| var weibo = module.exports = | |
| oauthModule.submodule('weibo') | |
| .configurable({ | |
| scope: "There's no idea about weibo's scope" | |
| }) | |
| .get('callbackPath', | |
| 'the callback path that the 3rd party OAuth provider redirects to after an OAuth authorization result - e.g., "/auth/twitter/callback"') | |
| .step('extractTokenAndVerifier', { | |
| description: 'extracts the request token and verifier from the url query', | |
| // ... | |
| }) | |
| .step('getSession', { | |
| // ... | |
| }) | |
| // ... |
| step: function (name) { | |
| var steps = this._steps | |
| , sequence = this._currSeq; | |
| if (!sequence) | |
| throw new Error("You can only declare a step after declaring a route alias via `get(...)` or `post(...)`."); | |
| sequence.orderedStepNames.push(name); | |
| this._currentStep = |
| everyModule.submodule('oauth') | |
| .configurable({ | |
| apiHost: 'e.g., https://api.twitter.com' | |
| , oauthHost: 'the host for the OAuth provider' | |
| , requestTokenPath: "the path on the OAuth provider's domain where we request the request token, e.g., /oauth/request_token" | |
| , accessTokenPath: "the path on the OAuth provider's domain where we request the access token, e.g., /oauth/access_token" | |
| , authorizePath: 'the path on the OAuth provider where you direct a visitor to login, e.g., /oauth/authorize' | |
| , sendCallbackWithAuthorize: 'whether you want oauth_callback=... as a query param send with your request to /oauth/authorize' | |
| , consumerKey: 'the api key provided by the OAuth provider' | |
| , consumerSecret: 'the api secret provided by the OAuth provider' |
| // Initialization style 1 | |
| var meetup = new Everyauth.OAuth({ | |
| name: 'meetup', | |
| oauthHost: 'https://secure.meetup.com', | |
| apiHost: 'https://api.meetup.com/2', | |
| accessTokenParams: { | |
| grant_type: 'authorization_code' | |
| }, | |
| // etc. | |
| }); |
| import com.github.bnoguchi.everyauth.*; | |
| import com.github.bnoguchi.everyauth.modules.OAuthSubmodule; | |
| public class MeetupGetter { | |
| public static final Submodule MEETUP; | |
| static { | |
| MEETUP = OAuthSubmodule.submodule("Meetup") | |
| .setOAuthHost("https://secure.meetup.com") |
| var oauthModule = require('./oauth2') | |
| , querystring= require('querystring'); | |
| var meetup = module.exports = | |
| oauthModule.submodule('meetup') | |
| .oauthHost('https://secure.meetup.com') | |
| .apiHost('https://api.meetup.com/2') | |
| .entryPath('/auth/meetup') |