-
Notifications
You must be signed in to change notification settings - Fork 6k
Allow ISO Date encoded timestamp fields in JWT tokens. #6187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
See #5250 (comment) |
@greyfairer Agreed...
I'll apply some improvements here. |
@greyfairer After giving this some further thought, we need to apply some more involved changes to Given this, I'm going to close this issue and associated PR as |
Summary
Both Auth0 and OneLogin identity providers use ISO Date strings for the 'updated_at' claim in JWT Tokens, even if the spec says these should be numeric (unix timestamp). https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims
If this happens, the StandardClaimAccessor#getUpdatedAt throws exceptions.
Actual Behavior
If you use an OpenID Connector that writes the 'updated_at' claim in a JWT token in ISO Date format instead of a numerical unix timestamp, the getters on OidcUserInfo throw errors, so you cannot use e.g. jackson to serialize this user info.
Expected Behavior
In general, getters should not throw exceptions. If the field is invalid, the constructor or the setter should throw an exception, or the field should be null.
In this case, it would be nice to accept ISO Date formatted timestamps as valid values, since apparently this is used by at least two major OIDC vendors.
Version
5.1.1.RELEASE
Sample
The text was updated successfully, but these errors were encountered: