Class: OmniAuth::Strategies::Singly

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

Constant Summary collapse

PASSTHROUGHS =
%w[
  access_token
  account
  scope
  service
]

Instance Method Summary collapse

Instance Method Details

#authorize_paramsObject



21
22
23
24
25
26
27
# File 'lib/omniauth/strategies/singly.rb', line 21

def authorize_params
  super.tap do |params|
    PASSTHROUGHS.each do |p|
      params[p.to_sym] = request.params[p] if request.params[p]
    end
  end
end

#raw_infoObject



35
36
37
38
39
40
41
# File 'lib/omniauth/strategies/singly.rb', line 35

def raw_info
  @raw_info ||= begin
    access_token.options[:mode] = :query
    access_token.options[:param_name] = :access_token
    access_token.get("/profiles").parsed
  end
end