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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonAuthenticationFailure(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.
-
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:
onAuthenticationFailurein interfaceorg.springframework.security.web.authentication.AuthenticationFailureHandler- Parameters:
request- the HttpServletRequest objectresponse- the HttpServletResponse objectauthenticationException- the AuthenticationException object
-