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



89
90
91
92
93
# File 'lib/omniauth/strategies/oauth2_oneid.rb', line 89

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

#business_infoObject



81
82
83
# File 'lib/omniauth/strategies/oauth2_oneid.rb', line 81

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

#callback_urlObject



95
96
97
# File 'lib/omniauth/strategies/oauth2_oneid.rb', line 95

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

#deepartment_infoObject



85
86
87
# File 'lib/omniauth/strategies/oauth2_oneid.rb', line 85

def deepartment_info
  @department_info || access_token.get(options.client_options[:department_url]).parsed
end

#emailObject



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

def email
  user_path['thai_email']
end

#raw_infoObject



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

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