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
21 22 23 24 25 26 |
# File 'lib/oauth2/strategy/base.rb', line 21 def access_token_params( = {}) { 'client_id' => @client.id, 'client_secret' => @client.secret }.merge() end |
#access_token_url(options = {}) ⇒ Object
17 18 19 |
# File 'lib/oauth2/strategy/base.rb', line 17 def access_token_url( = {}) @client.access_token_url(access_token_params()) end |
#authorize_params(options = {}) ⇒ Object
:nodoc:
12 13 14 15 |
# File 'lib/oauth2/strategy/base.rb', line 12 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 |
# File 'lib/oauth2/strategy/base.rb', line 8 def ( = {}) #:nodoc: @client.(()) end |