Skip to content

Commit

Permalink
Add enable_aws_email_tag
Browse files Browse the repository at this point in the history
  • Loading branch information
OllieJC committed Feb 15, 2024
1 parent 1f59324 commit fe11b7a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sso_oidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def get_available_scopes() -> list:
"profile",
"user_attribute:global:read",
"user_attribute:global:write",
"enable_aws_email_tag",
]


Expand Down Expand Up @@ -213,6 +214,9 @@ def generate_id_token(
payload["email_verified"] = True
payload["preferred_username"] = email

if "enable_aws_email_tag" in scopes:
payload["https://aws.amazon.com/tags"] = {"principal_tags": {"Email": [email]}}

if "profile" in scopes:
dn = None
if "attributes" in user and "display_name" in user["attributes"]:
Expand Down

0 comments on commit fe11b7a

Please sign in to comment.