Class: OAuth2::Strategy::Base
- Inherits:
-
Object
- Object
- OAuth2::Strategy::Base
- Defined in:
- lib/oauth2/strategy/base.rb
Overview
:nodoc:
Direct Known Subclasses
Instance Method Summary collapse
- #access_token_params(options = {}) ⇒ Object
- #access_token_url(options = {}) ⇒ Object
-
#authorize_params(options = {}) ⇒ Object
:nodoc:.
-
#authorize_url(options = {}) ⇒ Object
:nodoc:.
-
#initialize(client) ⇒ Base
constructor
:nodoc:.
Constructor Details
#initialize(client) ⇒ Base
:nodoc:
4 5 6 |
# File 'lib/oauth2/strategy/base.rb', line 4 def initialize(client)#:nodoc: @client = client end |
Instance Method Details
#access_token_params(options = {}) ⇒ Object
25 26 27 28 29 30 |
# File 'lib/oauth2/strategy/base.rb', line 25 def access_token_params( = {}) { 'client_id' => @client.id, 'client_secret' => @client.secret }.merge() end |
#access_token_url(options = {}) ⇒ Object
19 20 21 22 23 |
# File 'lib/oauth2/strategy/base.rb', line 19 def access_token_url( = {}) uri = URI.parse(@client.access_token_url) uri.query_hash = access_token_params() uri.to_s end |
#authorize_params(options = {}) ⇒ Object
:nodoc:
14 15 16 17 |
# File 'lib/oauth2/strategy/base.rb', line 14 def ( = {}) #:nodoc: = .inject({}){|h,(k,v)| h[k.to_s] = v; h} {'client_id' => @client.id}.merge() end |
#authorize_url(options = {}) ⇒ Object
:nodoc:
8 9 10 11 12 |
# File 'lib/oauth2/strategy/base.rb', line 8 def ( = {}) #:nodoc: uri = URI.parse(@client.) uri.query_hash = () uri.to_s end |