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 TypeMethodDescriptionvoid
handle
(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:LoginFailureHandler
Handles the request after a failed authentication- Specified by:
handle
in interfaceLoginFailureHandler
- Parameters:
context
- the request contexte
- the exception that caused the login to fail.- Throws:
SecurityProviderException
IOException
-