Class: OmniAuth::Strategies::OAuth2OneID

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

Instance Method Summary collapse

Instance Method Details

#authorize_paramsObject



82
83
84
85
86
# File 'lib/omniauth/strategies/oauth2_oneid.rb', line 82

def authorize_params
  params = super
  puts params.inspect
  params.transform_values { |v| v.respond_to?(:call) ? v.call(request) : v }
end

#business_infoObject



78
79
80
# File 'lib/omniauth/strategies/oauth2_oneid.rb', line 78

def business_info
  @business_info ||= access_token.get(options.client_options[:business_url]).parsed
end

#callback_urlObject



88
89
90
# File 'lib/omniauth/strategies/oauth2_oneid.rb', line 88

def callback_url
  options.client_options[:redirect_uri] || (full_host + script_name + callback_path)
end

#emailObject



70
71
72
# File 'lib/omniauth/strategies/oauth2_oneid.rb', line 70

def email
  user_path['thai_email']
end

#raw_infoObject



74
75
76
# File 'lib/omniauth/strategies/oauth2_oneid.rb', line 74

def raw_info
  @raw_info ||= access_token.get(options.client_options[:user_info_url]).parsed
end