Class: OmniAuth::Strategies::Amazon
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::Amazon
- Defined in:
- lib/omniauth/strategies/amazon.rb
Instance Method Summary collapse
Instance Method Details
#build_access_token ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/omniauth/strategies/amazon.rb', line 23 def build_access_token token_params = { :redirect_uri => callback_url.split('?').first, :client_id => client.id, :client_secret => client.secret } verifier = request.params['code'] client.auth_code.get_token(verifier, token_params) end |
#raw_info ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/omniauth/strategies/amazon.rb', line 48 def raw_info access_token.[:parse] = :json # This way is not working right now, do it the longer way # for the time being # #@raw_info ||= access_token.get('/ap/user/profile').parsed url = "/ap/user/profile" params = {:params => { :access_token => access_token.token}} @raw_info ||= access_token.client.request(:get, url, params).parsed end |