|
|
@ -6,6 +6,7 @@ module OmniAuth
|
|
|
|
authorize_url: '/oauth2.0/authorize',
|
|
|
|
authorize_url: '/oauth2.0/authorize',
|
|
|
|
token_url: '/oauth2.0/token'
|
|
|
|
token_url: '/oauth2.0/token'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
option :token_params, { parse: :query }
|
|
|
|
|
|
|
|
|
|
|
|
def request_phase
|
|
|
|
def request_phase
|
|
|
|
super
|
|
|
|
super
|
|
|
@ -38,8 +39,8 @@ module OmniAuth
|
|
|
|
def raw_info
|
|
|
|
def raw_info
|
|
|
|
access_token.options[:mode] = :query
|
|
|
|
access_token.options[:mode] = :query
|
|
|
|
@raw_info ||= begin
|
|
|
|
@raw_info ||= begin
|
|
|
|
res = access_token.get('/oauth2.0/me')
|
|
|
|
res = access_token.get('/oauth2.0/me', parse: :text).parsed
|
|
|
|
JSON.parse(res.body.to_s[10..-4])
|
|
|
|
JSON.parse(res.to_s[10..-4])
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|