Class KeycloakLogoutHandler

  • All Implemented Interfaces:
    org.springframework.security.web.server.authentication.logout.ServerLogoutHandler

    @Component
    public class KeycloakLogoutHandler
    extends java.lang.Object
    implements org.springframework.security.web.server.authentication.logout.ServerLogoutHandler
    • Constructor Summary

      Constructors 
      Constructor Description
      KeycloakLogoutHandler​(org.springframework.web.reactive.function.client.WebClient webClient, java.lang.String serverUrl)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      reactor.core.publisher.Mono<java.lang.Void> logout​(org.springframework.security.web.server.WebFilterExchange exchange, org.springframework.security.core.Authentication authentication)  
      reactor.core.publisher.Mono<java.lang.Void> logoutFromKeycloak​(java.lang.String idToken)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • KeycloakLogoutHandler

        public KeycloakLogoutHandler​(org.springframework.web.reactive.function.client.WebClient webClient,
                                     @Value("${spring.security.oauth2.client.registration.middle-proxy.server-url}")
                                     java.lang.String serverUrl)
    • Method Detail

      • logout

        public reactor.core.publisher.Mono<java.lang.Void> logout​(org.springframework.security.web.server.WebFilterExchange exchange,
                                                                  org.springframework.security.core.Authentication authentication)
        Specified by:
        logout in interface org.springframework.security.web.server.authentication.logout.ServerLogoutHandler
      • logoutFromKeycloak

        public reactor.core.publisher.Mono<java.lang.Void> logoutFromKeycloak​(java.lang.String idToken)