Class RestLoginFailureHandler
java.lang.Object
org.craftercms.security.utils.handlers.AbstractRestHandlerBase
org.craftercms.security.authentication.impl.RestLoginFailureHandler
- All Implemented Interfaces:
LoginFailureHandler
Implementation of
LoginFailureHandler for REST based applications,
which returns a 401 UNAUTHORIZED status with a the authentication exception message.- Author:
- avasquez
-
Field Summary
Fields inherited from class org.craftercms.security.utils.handlers.AbstractRestHandlerBase
responseWriter -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandle(org.craftercms.commons.http.RequestContext context, AuthenticationException e) Handles the request after a failed authenticationMethods inherited from class org.craftercms.security.utils.handlers.AbstractRestHandlerBase
sendErrorMessage, sendMessage, sendObject, setResponseWriter
-
Constructor Details
-
RestLoginFailureHandler
public RestLoginFailureHandler()
-
-
Method Details
-
handle
public void handle(org.craftercms.commons.http.RequestContext context, AuthenticationException e) throws SecurityProviderException, IOException Description copied from interface:LoginFailureHandlerHandles the request after a failed authentication- Specified by:
handlein interfaceLoginFailureHandler- Parameters:
context- the request contexte- the exception that caused the login to fail.- Throws:
SecurityProviderExceptionIOException
-