Class: OmniAuth::Strategies::Unipass
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::Unipass
- Defined in:
- lib/omniauth/strategies/unipass.rb
Constant Summary collapse
- DEFAULT_SCOPE =
'email'
Instance Method Summary collapse
Instance Method Details
#access_token_options ⇒ Object
60 61 62 |
# File 'lib/omniauth/strategies/unipass.rb', line 60 def ..inject({}){ |h,(k,v)| h[k.to_sym] = v; h } end |
#authorize_params ⇒ Object
52 53 54 55 56 57 58 |
# File 'lib/omniauth/strategies/unipass.rb', line 52 def super.tap do |params| params.merge!(:display => request.params['display']) if request.params['display'] params.merge!(:state => request.params['state']) if request.params['state'] params[:scope] ||= DEFAULT_SCOPE end end |
#callback_url ⇒ Object
44 45 46 47 48 49 50 |
# File 'lib/omniauth/strategies/unipass.rb', line 44 def callback_url if ..respond_to?(:callback_url) ..callback_url else super end end |
#raw_info ⇒ Object
40 41 42 |
# File 'lib/omniauth/strategies/unipass.rb', line 40 def raw_info @raw_info ||= access_token.get("#{[:client_options][:api_site]}/me").parsed end |