27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# File 'lib/omniauth/strategies/wepay.rb', line 27
def raw_info
c_options = options.client_options
params = {
code: request.params['code'],
client_id:options.client_id,
redirect_uri: callback_url,
client_secret: options.client_secret
}.to_param
url = c_options[:token_url] + "?" + params
info = access_token.post(url).parsed
user_url = c_options[:site] + c_options[:user_path]
info2 = client.request(:post, user_url) do |req|
req.["Authorization"] = "Bearer #{info["access_token"]}"
end.parsed
@raw_info ||= info.merge(info2)
end
|