Class: OmniAuth::Strategies::Authsch

Inherits:
OAuth2
  • Object
show all
Defined in:
lib/omniauth/strategies/authsch.rb

Overview

Main class for Auth.sch strategy.

Instance Method Summary collapse

Instance Method Details

#authorize_paramsObject



19
20
21
22
23
# File 'lib/omniauth/strategies/authsch.rb', line 19

def authorize_params
  super.tap do |params|
    params[:scope] = request.params['scope'] if request.params['scope']
  end
end

#raw_infoObject



38
39
40
41
42
43
44
# File 'lib/omniauth/strategies/authsch.rb', line 38

def raw_info
  access_token.options[:parse] = :json

  url = '/api/profile'
  params = { params: { access_token: access_token.token } }
  @raw_info ||= MultiJson.decode(access_token.client.request(:get, url, params).body)
end