-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Improve customizing OIDC UserInfo endpoint #785
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
I'm interested in picking this one up. |
@franzfloresjr You can now customize the UserInfo response using a custom |
Expected Behavior
It would be great if the
oidcUserInfoEndpointFilter
is configurable so that we can provide a customOidcUserInfoHttpMessageConverter
or configure theOidcUserInfoHttpMessageConverter#jsonMessageConverter
. In my case, I am usingjava.time.LocalDate
data type in thebirthdate
claim and need to serialize it to a formatted string (e.g.DateTimeFormatter.ISO_DATE
). Hence, I want to provide an object mapper with a configuredLocalDateSerializer
to theMappingJackson2HttpMessageConverter
.Current Behavior
The default
OidcUserInfoHttpMessageConverter#jsonMessageConverter
has a value ofnew MappingJackson2HttpMessageConverter()
which has a plainObjectMapper
(Jackson2ObjectMapperBuilder.json().build()
). OidcUserInfo claims that has a data type ofjava.time.LocalDate
(in my casebirthdate
) are written as array of numbers.Context
I want to serialize
java.time.LocalDate
to a formatted string. What I did to achieve this is to implement a customOidcUserInfoEndpontConfigurer
,OidcUserInfoEndpointFilter
andOidcUserInfoHttpMessageConverter
.The text was updated successfully, but these errors were encountered: