public class AccessDeniedHandlerImpl extends Object implements AccessDeniedHandler
AccessDeniedHandler, which forwards to the error page URL, so that the original
URL is preserved in the browser. If not error URL is specified, a 403 FORBIDDEN error is sent.| Modifier and Type | Field and Description |
|---|---|
protected String |
errorPageUrl |
| Constructor and Description |
|---|
AccessDeniedHandlerImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
forwardToErrorPage(org.craftercms.commons.http.RequestContext context) |
protected String |
getErrorPageUrl() |
void |
handle(org.craftercms.commons.http.RequestContext context,
AccessDeniedException e)
Forwards to the error page, but if not error page was specified, a 403 error is sent.
|
protected void |
saveException(org.craftercms.commons.http.RequestContext context,
AccessDeniedException e) |
protected void |
sendError(AccessDeniedException e,
org.craftercms.commons.http.RequestContext requestContext) |
void |
setErrorPageUrl(String errorPageUrl)
Sets the error page URL to forward to.
|
protected String errorPageUrl
public void setErrorPageUrl(String errorPageUrl)
protected String getErrorPageUrl()
public void handle(org.craftercms.commons.http.RequestContext context,
AccessDeniedException e)
throws SecurityProviderException,
IOException
handle in interface AccessDeniedHandlercontext - the request contexte - the exception with the reason of the access denySecurityProviderExceptionIOExceptionprotected void saveException(org.craftercms.commons.http.RequestContext context,
AccessDeniedException e)
protected void forwardToErrorPage(org.craftercms.commons.http.RequestContext context)
throws SecurityProviderException,
IOException
SecurityProviderExceptionIOExceptionprotected void sendError(AccessDeniedException e, org.craftercms.commons.http.RequestContext requestContext) throws IOException
IOExceptionCopyright © 2023 CrafterCMS. All rights reserved.