public class RestLoginFailureHandler extends AbstractRestHandlerBase implements LoginFailureHandler
LoginFailureHandler
for REST based applications,
which returns a 401 UNAUTHORIZED status with a the authentication exception message.responseWriter
Constructor and Description |
---|
RestLoginFailureHandler() |
Modifier and Type | Method and Description |
---|---|
void |
handle(org.craftercms.commons.http.RequestContext context,
AuthenticationException e)
Handles the request after a failed authentication
|
sendErrorMessage, sendMessage, sendObject, setResponseWriter
public void handle(org.craftercms.commons.http.RequestContext context, AuthenticationException e) throws SecurityProviderException, IOException
LoginFailureHandler
handle
in interface LoginFailureHandler
context
- the request contexte
- the exception that caused the login to fail.SecurityProviderException
IOException
Copyright © 2023 CrafterCMS. All rights reserved.