Class RestLoginFailureHandler
- java.lang.Object
-
- org.craftercms.security.utils.handlers.AbstractRestHandlerBase
-
- org.craftercms.security.authentication.impl.RestLoginFailureHandler
-
- All Implemented Interfaces:
LoginFailureHandler
public class RestLoginFailureHandler extends AbstractRestHandlerBase implements LoginFailureHandler
Implementation ofLoginFailureHandlerfor 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 Constructor Description RestLoginFailureHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandle(org.craftercms.commons.http.RequestContext context, AuthenticationException e)Handles the request after a failed authentication-
Methods inherited from class org.craftercms.security.utils.handlers.AbstractRestHandlerBase
sendErrorMessage, sendMessage, sendObject, setResponseWriter
-
-
-
-
Method Detail
-
handle
public void handle(org.craftercms.commons.http.RequestContext context, AuthenticationException e) throws SecurityProviderException, IOExceptionDescription 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
-
-