Skip to content

Commit cc96f59

Browse files
authored
Take dsub claim as subject if exsits (#629)
1 parent e39fe9e commit cc96f59

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.vscode/settings.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,9 @@
77
"mypy-type-checker.importStrategy": "fromEnvironment",
88
"isort.importStrategy": "fromEnvironment",
99
"black-formatter.importStrategy": "fromEnvironment",
10-
"workbench.colorCustomizations": { /* do not change please... */}
10+
"workbench.colorCustomizations": {
11+
"activityBar.background": "#4D1C3B",
12+
"titleBar.activeBackground": "#6B2752",
13+
"titleBar.activeForeground": "#FDF8FB"
14+
}
1115
}

descope/auth.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,9 @@ def adjust_properties(self, jwt_response: dict, user_jwt: bool):
502502
] # support both url issuer and project ID issuer
503503

504504
sub = (
505-
jwt_response.get(SESSION_TOKEN_NAME, {}).get("sub", None)
505+
jwt_response.get(SESSION_TOKEN_NAME, {}).get("dsub", None)
506+
or jwt_response.get(SESSION_TOKEN_NAME, {}).get("sub", None)
507+
or jwt_response.get(REFRESH_SESSION_TOKEN_NAME, {}).get("dsub", None)
506508
or jwt_response.get(REFRESH_SESSION_TOKEN_NAME, {}).get("sub", None)
507509
or jwt_response.get("sub", "")
508510
)

0 commit comments

Comments
 (0)