Skip to content

Commit 49ae6b4

Browse files
committed
Code review fixes
1 parent 8c110df commit 49ae6b4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

examples/RetrievingData.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

src/auth0_server_python/auth_server/server_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)