Class: OmniAuth::Strategies::AinewsAuth

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

Instance Method Summary collapse

Instance Method Details

#build_access_tokenObject



29
30
31
32
# File 'lib/omniauth/strategies/ainews_auth.rb', line 29

def build_access_token
  options.token_params.merge!({ auth_code: request.params['auth_code'], state: request.params['state'] })
  super
end

#raw_infoObject



53
54
55
56
57
58
59
# File 'lib/omniauth/strategies/ainews_auth.rb', line 53

def raw_info
  @raw_info ||= access_token.post(
    '/login/v1/get-user', body: options[:token_params].merge(
      { access_token: access_token.token }
    )
  ).parsed
end