Class DefaultExceptionMappingAuthenticationFailureHandler
java.lang.Object
org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler
com.broadleafcommerce.auth.security.web.authentication.DefaultExceptionMappingAuthenticationFailureHandler
- All Implemented Interfaces:
org.springframework.security.web.authentication.AuthenticationFailureHandler
public class DefaultExceptionMappingAuthenticationFailureHandler
extends org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler
-
Field Summary
Fields inherited from class org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<AuthenticationFailureExceptionMapping>protected Map<String,AuthenticationFailureExceptionMapping> Deprecated.since Authentication Service 2.3.0, Release Train 2.3.0protected AuthenticationFailureExceptionMappinggetMatchingAuthenticationFailureExceptionMapping(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException exception) protected StringgetRootCauseException(org.springframework.security.core.AuthenticationException exception) Deprecated, for removal: This API element is subject to removal in a future version.since Authentication Service 2.3.0, Release Train 2.3.0voidhandleContextRefresh(org.springframework.context.event.ContextRefreshedEvent event) voidonAuthenticationFailure(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException exception) protected voidsetAuthenticationFailureExceptionMappings(List<AuthenticationFailureExceptionMapping> authenticationFailureExceptionMappings) Methods inherited from class org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler
getRedirectStrategy, isAllowSessionCreation, isUseForward, saveException, setAllowSessionCreation, setDefaultFailureUrl, setRedirectStrategy, setUseForward
-
Constructor Details
-
DefaultExceptionMappingAuthenticationFailureHandler
public DefaultExceptionMappingAuthenticationFailureHandler()
-
-
Method Details
-
getAuthenticationFailureExceptionMappings
- Returns:
- the currently configured list of authentication failure exception mappings
- Since:
- Authentication Service 2.3.0, Release Train 2.3.0
-
onAuthenticationFailure
public void onAuthenticationFailure(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException exception) throws IOException, jakarta.servlet.ServletException - Specified by:
onAuthenticationFailurein interfaceorg.springframework.security.web.authentication.AuthenticationFailureHandler- Overrides:
onAuthenticationFailurein classorg.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler- Throws:
IOExceptionjakarta.servlet.ServletException
-
getMatchingAuthenticationFailureExceptionMapping
@Nullable protected AuthenticationFailureExceptionMapping getMatchingAuthenticationFailureExceptionMapping(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException exception) - Parameters:
request- the request to check a match forresponse- the response to check a match forexception- the exception to check a match for- Returns:
- the matching
AuthenticationFailureExceptionMappingthat should handle the request if found,nullotherwise - Since:
- Authentication Service 2.3.0, Release Train 2.3.0
-
handleContextRefresh
@EventListener public void handleContextRefresh(org.springframework.context.event.ContextRefreshedEvent event) -
setAuthenticationFailureExceptionMappings
protected void setAuthenticationFailureExceptionMappings(List<AuthenticationFailureExceptionMapping> authenticationFailureExceptionMappings) - Parameters:
authenticationFailureExceptionMappings- the updated failure mappings to set- Since:
- Authentication Service 2.3.0, Release Train 2.3.0
-
getRootCauseException
@Deprecated(since="Authentication Service 2.3.0, Release Train 2.3.0", forRemoval=true) protected String getRootCauseException(org.springframework.security.core.AuthenticationException exception) Deprecated, for removal: This API element is subject to removal in a future version.since Authentication Service 2.3.0, Release Train 2.3.0 -
getFailureUrlMap
Deprecated.since Authentication Service 2.3.0, Release Train 2.3.0
-