Class: OmniAuth::Strategies::Krystal
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::Krystal
- Defined in:
- lib/omniauth/strategies/krystal.rb
Instance Method Summary collapse
- #callback_url ⇒ Object
-
#initialize(app, *args, &block) ⇒ Krystal
constructor
A new instance of Krystal.
- #raw_info ⇒ Object
- #scope ⇒ Object
Constructor Details
#initialize(app, *args, &block) ⇒ Krystal
Returns a new instance of Krystal.
41 42 43 44 45 46 47 |
# File 'lib/omniauth/strategies/krystal.rb', line 41 def initialize(app, *args, &block) super ..site ||= "#{..url}/api/v1" .. ||= "#{..url}/oauth2/auth" ..token_url ||= "#{..url}/oauth2/token" end |
Instance Method Details
#callback_url ⇒ Object
53 54 55 |
# File 'lib/omniauth/strategies/krystal.rb', line 53 def callback_url full_host + script_name + callback_path end |
#raw_info ⇒ Object
57 58 59 |
# File 'lib/omniauth/strategies/krystal.rb', line 57 def raw_info @raw_info ||= access_token.get('user').parsed end |
#scope ⇒ Object
49 50 51 |
# File 'lib/omniauth/strategies/krystal.rb', line 49 def scope access_token['scope'] end |