From 0a4b744cacc0a5a5a5f586d1368f387b9b1187d8 Mon Sep 17 00:00:00 2001 From: Mark Adams Date: Sun, 21 Jun 2015 09:01:06 -0500 Subject: [PATCH] Updated Bitbucket backend to use the UUID as the ID_KEY Reference: https://confluence.atlassian.com/display/BITBUCKET/Use+the+Bitbucket+REST+APIs#UsetheBitbucketRESTAPIs-uuid-mainUniversallyUniqueIdentifier(UUID) --- social/backends/bitbucket.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/social/backends/bitbucket.py b/social/backends/bitbucket.py index 8bb083e7e..c0574659a 100644 --- a/social/backends/bitbucket.py +++ b/social/backends/bitbucket.py @@ -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'])