R60: accept single-string groups/roles; fix mem over-evict

This commit is contained in:
2026-08-13 16:06:43 +01:00
parent e61edaa5b3
commit 1df9b98aeb
5 changed files with 136 additions and 21 deletions
+4 -2
View File
@@ -151,9 +151,11 @@ func TestCustomClaimNames_MalformedRoleClaim(t *testing.T) {
// Configure custom claim names
ts.tOidc.roleClaimName = "custom_roles"
// Create token with malformed role claim (not an array)
// Create token with malformed role claim (non-string, non-array scalar).
// A single-string role claim is now accepted as a 1-element list, so
// "malformed" here means a scalar that is neither.
claims := map[string]interface{}{
"custom_roles": "this-should-be-an-array",
"custom_roles": 12345,
}
token, err := createTestJWT(ts.rsaPrivateKey, "RS256", "test-key-id", claims)