Class: OmniAuth::Strategies::Avvo

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

Instance Method Summary collapse

Instance Method Details

#callback_urlObject



45
46
47
# File 'lib/omniauth/strategies/avvo.rb', line 45

def callback_url
  full_host + script_name + callback_path
end

#raw_infoObject



36
37
38
39
40
41
42
43
# File 'lib/omniauth/strategies/avvo.rb', line 36

def raw_info
  @raw_info ||= begin
    access_token.options[:header_format] = "OAuth %s"
    json = access_token.get('/api/2/users/me').body
    user_data = JSON.parse(json) || {} rescue {}
    user_data["user"] || {}
  end
end