Class: OmniAuth::Strategies::Avaza
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::Avaza
- Defined in:
- lib/omniauth/strategies/avaza.rb
Overview
Strategy for Avaza
Constant Summary collapse
- DEFAULT_SCOPE =
'read_users'
Instance Method Summary collapse
Instance Method Details
#authorize_params ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/omniauth/strategies/avaza.rb', line 50 def super.tap do |params| %w[scope state].each do |value| next unless request.params[value] params[value.to_sym] = request.params[value] session['omniauth.state'] = params[:state] if value == 'state' end params[:scope] ||= DEFAULT_SCOPE end end |
#callback_url ⇒ Object
42 43 44 |
# File 'lib/omniauth/strategies/avaza.rb', line 42 def callback_url [:redirect_uri] || (full_host + script_name + callback_path) end |
#raw_info ⇒ Object
46 47 48 |
# File 'lib/omniauth/strategies/avaza.rb', line 46 def raw_info @raw_info ||= access_token.get(user_profile_api_endpoint).parsed['users'].first end |