OIDC: Fallback to userinfo endpoint when JWT token does not contain an email claim.

This commit is contained in:
Maurus Decimus
2026-04-28 14:59:55 +02:00
parent 3e07a0fb19
commit c0c889b7fb
6 changed files with 152 additions and 8 deletions

View File

@@ -68,6 +68,71 @@
}
}
]
},
{
"clientId": "stalwart-fallback",
"enabled": true,
"clientAuthenticatorType": "client-secret",
"secret": "stalwart-fallback-secret",
"redirectUris": [
"*"
],
"webOrigins": [
"*"
],
"publicClient": false,
"protocol": "openid-connect",
"directAccessGrantsEnabled": true,
"standardFlowEnabled": true,
"serviceAccountsEnabled": true,
"defaultClientScopes": [
"openid"
],
"optionalClientScopes": [
"email",
"profile",
"roles"
],
"protocolMappers": [
{
"name": "email-claim-userinfo-only",
"protocol": "openid-connect",
"protocolMapper": "oidc-usermodel-attribute-mapper",
"consentRequired": false,
"config": {
"user.attribute": "email",
"id.token.claim": "false",
"access.token.claim": "false",
"claim.name": "email",
"userinfo.token.claim": "true",
"jsonType.label": "String"
}
},
{
"name": "groups-userinfo-only",
"protocol": "openid-connect",
"protocolMapper": "oidc-group-membership-mapper",
"consentRequired": false,
"config": {
"full.path": "false",
"id.token.claim": "false",
"access.token.claim": "false",
"claim.name": "groups",
"userinfo.token.claim": "true"
}
},
{
"name": "audience",
"protocol": "openid-connect",
"protocolMapper": "oidc-audience-mapper",
"consentRequired": false,
"config": {
"included.client.audience": "stalwart",
"id.token.claim": "false",
"access.token.claim": "true"
}
}
]
}
],
"users": [