diff options
author | Valery Sizov <valery@gitlab.com> | 2016-12-14 11:53:29 +0200 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2016-12-14 11:54:17 +0200 |
commit | f20ea1f5cb354db0afe18e4021e1d2fb439c2e06 (patch) | |
tree | 766eada44b35bb67f00fb4f2e8a15cdc369731dc /lib/omniauth | |
parent | e39f024029b46322c1bf24409fd5ce7bfcef2da5 (diff) | |
download | gitlab-ce-f20ea1f5cb354db0afe18e4021e1d2fb439c2e06.tar.gz |
Fix BB authentication[ci skip]
Diffstat (limited to 'lib/omniauth')
-rw-r--r-- | lib/omniauth/strategies/bitbucket.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/omniauth/strategies/bitbucket.rb b/lib/omniauth/strategies/bitbucket.rb index 475aad5970f..5a7d67c2390 100644 --- a/lib/omniauth/strategies/bitbucket.rb +++ b/lib/omniauth/strategies/bitbucket.rb @@ -11,10 +11,6 @@ module OmniAuth token_url: 'https://bitbucket.org/site/oauth2/access_token' } - def callback_url - full_host + script_name + callback_path - end - uid do raw_info['username'] end @@ -28,7 +24,7 @@ module OmniAuth end def raw_info - @raw_info ||= access_token.get('user').parsed + @raw_info ||= access_token.get('api/2.0/user').parsed end def primary_email @@ -37,7 +33,7 @@ module OmniAuth end 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 end end |