Class: OmniAuth::Strategies::PicPlz

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

Instance Method Summary collapse

Instance Method Details

#auth_hashObject



17
18
19
20
# File 'lib/omniauth/strategies/picplz.rb', line 17

def auth_hash
  OmniAuth::Utils.deep_merge(super, client_params.merge({
    :grant_type => 'authorization_code'}))
end

#raw_infoObject



28
29
30
31
32
33
# File 'lib/omniauth/strategies/picplz.rb', line 28

def raw_info
  access_token.options[:mode] = :query
  access_token.options[:param_name] = :oauth_token
  response = access_token.get('https://api.picplz.com/api/v2/user.json?id=self').parsed['value']
  @raw_info ||= response['users'].last
end

#request_phaseObject



12
13
14
15
# File 'lib/omniauth/strategies/picplz.rb', line 12

def request_phase
  options[:authorize_params] = client_params.merge(options[:authorize_params])
  super
end