Class RestAccessDeniedHandler
java.lang.Object
org.craftercms.security.utils.handlers.AbstractRestHandlerBase
org.craftercms.security.authorization.impl.RestAccessDeniedHandler
- All Implemented Interfaces:
AccessDeniedHandler
Implementation of
AccessDeniedHandler
for 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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
handle
(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
-
Constructor Details
-
RestAccessDeniedHandler
public RestAccessDeniedHandler()
-
-
Method Details
-
handle
public void handle(org.craftercms.commons.http.RequestContext context, AccessDeniedException e) throws SecurityProviderException, IOException Description copied from interface:AccessDeniedHandler
Handles the request after access to a resource is denied for a user.- Specified by:
handle
in interfaceAccessDeniedHandler
- Parameters:
context
- the request contexte
- the exception with the reason of the access deny- Throws:
SecurityProviderException
IOException
-