While working on #14831 I noticed that many default lambda-based factories can be moved to classes where they are used, for example:
final class DefaultOidcLogoutTokenValidatorFactory implements Function<ClientRegistration, OAuth2TokenValidator<Jwt>> {
@Override
public OAuth2TokenValidator<Jwt> apply(ClientRegistration clientRegistration) {
return JwtValidators.createDefaultWithValidators(new OidcBackChannelLogoutTokenValidator(clientRegistration));
}
}
can be moved to OidcBackChannelLogoutReactiveAuthenticationManager as private nested class etc. So far I have found only one such example, but perhaps there are more.
Comment From: marcusdacoregio
Hi @CrazyParanoid. Maybe I am missing something but I don't see the aggregated value in doing such change. In that case it seems more like a code style than anything else. We prefer to only make changes if they have a clear advantage over what the current code is.
With that said I'll close this but feel free to add more context if you think there is some value in this.