Expected Behavior
I want to customize the authenticationResultConverter field in the OAuth2LoginAuthenticationFilter.
just using such as .oauth2Login().authorizationEndpoint().authenticationResultConverter(xxx)
Context spring-security-oauth2-client-5.7.1.jar
Comment From: marcusdacoregio
Hi, @markixy. Have you tried using the ObjectPostProcessor?
http
.oauth2Login(Customizer.withDefaults())
.objectPostProcessor(new ObjectPostProcessor<OAuth2LoginAuthenticationFilter>() {
@Override
public <O extends OAuth2LoginAuthenticationFilter> O postProcess(O object) {
object.setAuthenticationResultConverter(myAuthenticationResultConverter);
return object;
}
});
Comment From: markixy
thanks, it works.