Commit f20ea1f5 authored by Valery Sizov's avatar Valery Sizov

Fix BB authentication[ci skip]

parent e39f0240
...@@ -11,10 +11,6 @@ module OmniAuth ...@@ -11,10 +11,6 @@ module OmniAuth
token_url: 'https://bitbucket.org/site/oauth2/access_token' token_url: 'https://bitbucket.org/site/oauth2/access_token'
} }
def callback_url
full_host + script_name + callback_path
end
uid do uid do
raw_info['username'] raw_info['username']
end end
...@@ -28,7 +24,7 @@ module OmniAuth ...@@ -28,7 +24,7 @@ module OmniAuth
end end
def raw_info def raw_info
@raw_info ||= access_token.get('user').parsed @raw_info ||= access_token.get('api/2.0/user').parsed
end end
def primary_email def primary_email
...@@ -37,7 +33,7 @@ module OmniAuth ...@@ -37,7 +33,7 @@ module OmniAuth
end end
def emails def emails
email_response = access_token.get('user/emails').parsed email_response = access_token.get('api/2.0/user/emails').parsed
@emails ||= email_response && email_response['values'] || nil @emails ||= email_response && email_response['values'] || nil
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment