Class CustomKeycloakAuthenticationFailureHandler

java.lang.Object
org.trustdeck.security.authentication.handler.CustomKeycloakAuthenticationFailureHandler
All Implemented Interfaces:
org.springframework.security.web.authentication.AuthenticationFailureHandler

public class CustomKeycloakAuthenticationFailureHandler extends Object implements org.springframework.security.web.authentication.AuthenticationFailureHandler
Handles the output if the request contains an invalid token.
Author:
Eric Wündisch and Armin Müller
  • Constructor Details

    • CustomKeycloakAuthenticationFailureHandler

      public CustomKeycloakAuthenticationFailureHandler()
  • Method Details

    • onAuthenticationFailure

      public void onAuthenticationFailure(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException authenticationException)
      Triggers if the authentication with the given token failed.
      Specified by:
      onAuthenticationFailure in interface org.springframework.security.web.authentication.AuthenticationFailureHandler
      Parameters:
      request - the HttpServletRequest object
      response - the HttpServletResponse object
      authenticationException - the AuthenticationException object