StandardClaimAccessor.getEmailVerified
returns null
if the claim email_verified
does not exist
#12587
Labels
in: oauth2
An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
status: declined
A suggestion or change that we don't feel we should currently apply
Expected Behavior
The documentation of the method states:
Current Behavior
If the claim
email_verified
doesn't exist, returnsnull
.Context
A user of my application reported a NPE when trying to use OIDC with Azure AD.
IMHO, either the documentation should be enhanced to clarify that
getEmailVerified
can returnnull
if the claim is not present, or the code should handle this in atry/catch
block to returnfalse
if the claim does not exist.The text was updated successfully, but these errors were encountered: