Skip to content

Commit

Permalink
Fix deprecated Atlassian field name
Browse files Browse the repository at this point in the history
  • Loading branch information
fsto authored and nijel committed Oct 25, 2024
1 parent c2b71d7 commit f6d0cdd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion social_core/backends/atlassian.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def auth_params(self, state=None):
def get_user_details(self, response):
fullname, first_name, last_name = self.get_user_names(response["displayName"])
return {
"username": response["name"],
"username": response["accountId"],
"email": response["emailAddress"],
"fullname": fullname,
"first_name": first_name,
Expand Down
3 changes: 1 addition & 2 deletions social_core/tests/backends/test_atlassian.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class AtlassianOAuth2Test(OAuth2Test):
backend_path = "social_core.backends.atlassian.AtlassianOAuth2"
tenant_url = "https://api.atlassian.com/oauth/token/accessible-resources"
user_data_url = "https://api.atlassian.com/ex/jira/FAKED_CLOUD_ID/rest/api/2/myself"
expected_username = "erlich"
expected_username = "9927935d01-92a7-4687-8272-a9b8d3b2ae2e"
access_token_body = json.dumps({"access_token": "aviato", "token_type": "bearer"})
tenant_data_body = json.dumps(
[
Expand All @@ -26,7 +26,6 @@ class AtlassianOAuth2Test(OAuth2Test):
"self": "http://bachmanity.atlassian.net/rest/api/3/user?username=erlich",
"key": "erlich",
"accountId": "99:27935d01-92a7-4687-8272-a9b8d3b2ae2e",
"name": "erlich",
"emailAddress": "[email protected]",
"avatarUrls": {
"48x48": "http://bachmanity.atlassian.net/secure/useravatar?size=large&ownerId=erlich",
Expand Down

0 comments on commit f6d0cdd

Please sign in to comment.