Skip to content

Commit

Permalink
Updated Bitbucket backend to use the UUID as the ID_KEY
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-adams committed Jun 21, 2015
1 parent 6c59ceb commit 0a4b744
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions social/backends/bitbucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ class BitbucketOAuth(BaseOAuth1):
REQUEST_TOKEN_URL = 'https://bitbucket.org/api/1.0/oauth/request_token'
ACCESS_TOKEN_URL = 'https://bitbucket.org/api/1.0/oauth/access_token'

# Bitbucket usernames can change. The account ID should always be the UUID
# See: https://confluence.atlassian.com/display/BITBUCKET/Use+the+Bitbucket+REST+APIs
ID_KEY = 'uuid'

def get_user_details(self, response):
"""Return user details from Bitbucket account"""
fullname, first_name, last_name = self.get_user_names(response['display_name'])
Expand Down

0 comments on commit 0a4b744

Please sign in to comment.