File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
src/auth0_server_python/auth_server Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ default_token = await server_client.get_access_token()
128128# returns token for https://api.example.com with openid, email, and profile scopes
129129
130130 # Get token for different audience
131- data_token = await server_client.get_access_token(audience = " https://data-api .example.com" )
131+ data_token = await server_client.get_access_token(audience = " https://analytics .example.com" )
132132# returns token for https://analytics.example.com with read:analytics and write:analytics scopes
133133
134134# Get token with additional scopes
Original file line number Diff line number Diff line change @@ -678,7 +678,8 @@ def _find_matching_token_set(
678678 for token_set in token_sets :
679679 token_set_audience = token_set .get ("audience" )
680680 matches_audience = token_set_audience == audience
681- matches_scope = not scope or token_set .get ("scope" , None ) == scope
681+ token_set_scopes = set (token_set .get ("scope" , "" ).split ())
682+ matches_scope = not scope or token_set_scopes == set (scope .split ())
682683 if matches_audience and matches_scope :
683684 match = token_set
684685 break
You can’t perform that action at this time.
0 commit comments