fixed method header
This commit is contained in:
Родитель
1512c2c6bf
Коммит
510c42069c
|
@ -13,7 +13,7 @@ module OmniAuth
|
||||||
end
|
end
|
||||||
|
|
||||||
def auth_hash
|
def auth_hash
|
||||||
hash = user_info
|
hash = user_info(@access_token)
|
||||||
|
|
||||||
OmniAuth::Utils.deep_merge(
|
OmniAuth::Utils.deep_merge(
|
||||||
super, {
|
super, {
|
||||||
|
@ -23,10 +23,10 @@ module OmniAuth
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def user_info
|
def user_info(access_token)
|
||||||
authenticated_user = MultiXml.parse(@access_token.get('/api/auth_user').body)
|
authenticated_user = MultiXml.parse(access_token.get('/api/auth_user').body)
|
||||||
id = authenticated_user['GoodreadsResponse']['user']['id'].to_i
|
id = authenticated_user['GoodreadsResponse']['user']['id'].to_i
|
||||||
response_doc = MultiXml.parse(@access_token.get("/user/show/#{id}.xml?key=#{@consumer_key}").body)
|
response_doc = MultiXml.parse(access_token.get("/user/show/#{id}.xml?key=#{@consumer_key}").body)
|
||||||
user = response_doc['GoodreadsResponse']['user']
|
user = response_doc['GoodreadsResponse']['user']
|
||||||
|
|
||||||
hash = {
|
hash = {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче