Support for overriding components used in org.springframework.security.oauth2.client, and implementation of OidcRelyingPartyInitiatedLogoutHandler.
<dependency>
<groupId>net.optionfactory.spring</groupId>
<artifactId>authentication-authorization-code</artifactId>
</dependency>Configure the OIDC logout handler in your Spring Security configuration:
@Bean
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
http.logout(logout -> logout
.logoutSuccessHandler(new OidcRelyingPartyInitiatedLogoutHandler(
URI.create("https://idp.example.com/logout"),
URI.create("https://myapp.example.com/")
))
);
// ...
return http.build();
}The module provides components that allow using a custom RestOperations for OAuth2/OIDC:
ConfigurableAuthorizationCodeTokenResponseClientConfigurableOauth2UserServiceConfigurableOidcIdTokenDecoderFactory