Fix: Wrong IdToken passed when AccessToken was configured

This commit is contained in:
2025-05-06 20:21:00 +01:00
parent 2583266738
commit 075476792f
6 changed files with 481 additions and 23 deletions
+4 -4
View File
@@ -192,14 +192,14 @@ func TestTemplateExecutionContext(t *testing.T) {
expectedValue string
}{
{
name: "Access and ID token identity",
name: "Access and ID token distinction",
templateText: "Access: {{.AccessToken}} ID: {{.IdToken}}",
data: templateData{
AccessToken: "access-token",
IdToken: "access-token", // Same as AccessToken in processAuthorizedRequest
AccessToken: "access-token-value",
IdToken: "id-token-value", // Now these should be distinct values
Claims: map[string]interface{}{},
},
expectedValue: "Access: access-token ID: access-token",
expectedValue: "Access: access-token-value ID: id-token-value",
},
{
name: "Combining tokens and claims",