Class: OmniAuth::Strategies::Vis
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::Vis
- Defined in:
- lib/omniauth/strategies/vis.rb
Instance Method Summary collapse
-
#callback_url ⇒ Object
to fix always getting invalid_grant error see github.com/omniauth/omniauth-oauth2/issues/81#issuecomment-231442739.
- #on_path?(path) ⇒ Boolean
- #raw_info ⇒ Object
- #setup_phase ⇒ Object
Instance Method Details
#callback_url ⇒ Object
to fix always getting invalid_grant error see github.com/omniauth/omniauth-oauth2/issues/81#issuecomment-231442739
37 38 39 |
# File 'lib/omniauth/strategies/vis.rb', line 37 def callback_url full_host + script_name + callback_path end |
#on_path?(path) ⇒ Boolean
14 15 16 |
# File 'lib/omniauth/strategies/vis.rb', line 14 def on_path?(path) current_path.squeeze('/').casecmp(path.squeeze('/')).zero? end |
#raw_info ⇒ Object
41 42 43 |
# File 'lib/omniauth/strategies/vis.rb', line 41 def raw_info @raw_info ||= access_token.get('/api/v1/me.json').parsed end |
#setup_phase ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/omniauth/strategies/vis.rb', line 18 def setup_phase # Authorize extra params = [:locale, :confirm_identity, :allow_sign_up, :allowed_external_providers, :extra_agreement_title, :extra_agreement_text] .each do |param| request.env['omniauth.strategy'].[:authorize_params][param] = request.params[param.to_s] end end |