Class: OmniAuth::Strategies::Untappd

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

Instance Method Summary collapse

Instance Method Details

#authorize_paramsObject



46
47
48
49
# File 'lib/omniauth/strategies/untappd.rb', line 46

def authorize_params
  options.authorize_params[:redirect_url] = callback_url
  super
end

#clientObject



42
43
44
# File 'lib/omniauth/strategies/untappd.rb', line 42

def client
  ::OAuth2::UntappdClient.new(options.client_id, options.client_secret, deep_symbolize(options.client_options))
end

#raw_infoObject



56
57
58
59
60
# File 'lib/omniauth/strategies/untappd.rb', line 56

def raw_info
  access_token.options[:mode] = :query
  access_token.options[:param_name] = :access_token
  @raw_info ||= access_token.get('https://api.untappd.com/v4/user/info').parsed['response']['user']
end

#token_paramsObject



51
52
53
54
# File 'lib/omniauth/strategies/untappd.rb', line 51

def token_params
  options.token_params[:redirect_url] = callback_url
  super
end