Skip to content

Commit

Permalink
Remove unused AAD token to support other identity providers (#459)
Browse files Browse the repository at this point in the history
  • Loading branch information
gochristoph committed Jan 9, 2024
1 parent f187a36 commit 9ba81d3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions backend/auth/auth_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ def get_authenticated_user_details(request_headers):
## if it is, get the user details from the EasyAuth headers
raw_user_object = {k:v for k,v in request_headers.items()}

user_object['user_principal_id'] = raw_user_object['X-Ms-Client-Principal-Id']
user_object['user_name'] = raw_user_object['X-Ms-Client-Principal-Name']
user_object['auth_provider'] = raw_user_object['X-Ms-Client-Principal-Idp']
user_object['auth_token'] = raw_user_object['X-Ms-Token-Aad-Id-Token']
user_object['client_principal_b64'] = raw_user_object['X-Ms-Client-Principal']
user_object['aad_id_token'] = raw_user_object["X-Ms-Token-Aad-Id-Token"]
user_object['user_principal_id'] = raw_user_object.get('X-Ms-Client-Principal-Id')
user_object['user_name'] = raw_user_object.get('X-Ms-Client-Principal-Name')
user_object['auth_provider'] = raw_user_object.get('X-Ms-Client-Principal-Idp')
user_object['auth_token'] = raw_user_object.get('X-Ms-Token-Aad-Id-Token')
user_object['client_principal_b64'] = raw_user_object.get('X-Ms-Client-Principal')
user_object['aad_id_token'] = raw_user_object.get('X-Ms-Token-Aad-Id-Token')

return user_object

0 comments on commit 9ba81d3

Please sign in to comment.