Cannot serialize OAuth2AuthenticationToken to JSON #4991
Labels
in: oauth2
An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
status: duplicate
A duplicate of another issue
Uh oh!
There was an error while loading. Please reload this page.
Summary
For a simple app with OIDC login I cannot serialize Principal/OAuth2AuthenticationToken as JSON:
Failed to write HTTP message: org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: Unable to convert claim 'iat' to Instant: For input string: "Fri Feb 02 14:05:58 CET 2018"; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Unable to convert claim 'iat' to Instant: For input string: "Fri Feb 02 14:05:58 CET 2018" (through reference chain: org.springframework.security.oauth2.client.authentication.OAuth2AuthenticationToken["principal"]->org.springframework.security.oauth2.core.oidc.user.DefaultOidcUser["issuedAt"])
Version
Spring Boot 2.0.0.RC1
Spring Security 5.0.1.RELEASE
The text was updated successfully, but these errors were encountered: