Class RestAccessDeniedHandler
- java.lang.Object
-
- org.craftercms.security.utils.handlers.AbstractRestHandlerBase
-
- org.craftercms.security.authorization.impl.RestAccessDeniedHandler
-
- All Implemented Interfaces:
AccessDeniedHandler
public class RestAccessDeniedHandler extends AbstractRestHandlerBase implements AccessDeniedHandler
Implementation ofAccessDeniedHandlerfor REST based applications, which returns a 403 FORBIDDEN status with the access denied exception message.- Author:
- avasquez
-
-
Field Summary
-
Fields inherited from class org.craftercms.security.utils.handlers.AbstractRestHandlerBase
responseWriter
-
-
Constructor Summary
Constructors Constructor Description RestAccessDeniedHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandle(org.craftercms.commons.http.RequestContext context, AccessDeniedException e)Handles the request after access to a resource is denied for a user.-
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, AccessDeniedException e) throws SecurityProviderException, IOExceptionDescription copied from interface:AccessDeniedHandlerHandles the request after access to a resource is denied for a user.- Specified by:
handlein interfaceAccessDeniedHandler- Parameters:
context- the request contexte- the exception with the reason of the access deny- Throws:
SecurityProviderExceptionIOException
-
-