Class: Weibo2::Strategy::AuthCode
- Inherits:
-
OAuth2::Strategy::AuthCode
- Object
- OAuth2::Strategy::AuthCode
- Weibo2::Strategy::AuthCode
- Defined in:
- lib/weibo2/strategy/auth_code.rb
Overview
The Authorization Code Strategy
Instance Method Summary collapse
-
#authorize_url(params = {}) ⇒ Object
The authorization URL endpoint of the provider.
-
#get_token(code, params = {}, opts = {}) ⇒ Object
Retrieve an access token given the specified validation code.
Instance Method Details
#authorize_url(params = {}) ⇒ Object
The authorization URL endpoint of the provider
11 12 13 14 |
# File 'lib/weibo2/strategy/auth_code.rb', line 11 def (params={}) params = {:redirect_uri => @client.redirect_uri}.merge(params) super params end |
#get_token(code, params = {}, opts = {}) ⇒ Object
Note:
that you must also provide a :redirect_uri with most OAuth 2.0 providers
Retrieve an access token given the specified validation code.
22 23 24 25 |
# File 'lib/weibo2/strategy/auth_code.rb', line 22 def get_token(code, params={}, opts={}) params = {:redirect_uri => @client.redirect_uri}.merge(params) super(code, params, opts) end |