public class RestAuthenticationRequiredHandler extends AbstractRestHandlerBase implements AuthenticationRequiredHandler
AuthenticationRequiredHandler for REST based
applications, which returns a 401 UNAUTHORIZED status with the authentication exception message.responseWriter| Constructor and Description |
|---|
RestAuthenticationRequiredHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
handle(org.craftercms.commons.http.RequestContext context,
AuthenticationException e)
Handles the request when authentication is required.
|
sendErrorMessage, sendMessage, sendObject, setResponseWriterpublic void handle(org.craftercms.commons.http.RequestContext context,
AuthenticationException e)
throws SecurityProviderException,
IOException
AuthenticationRequiredHandlerhandle in interface AuthenticationRequiredHandlercontext - the request contexte - the exception with the reason for requiring authenticationSecurityProviderExceptionIOExceptionCopyright © 2023 CrafterCMS. All rights reserved.