Class CustomAccessDeniedHandler
java.lang.Object
org.trustdeck.security.authentication.handler.CustomAccessDeniedHandler
- All Implemented Interfaces:
org.springframework.security.web.access.AccessDeniedHandler
public class CustomAccessDeniedHandler
extends Object
implements org.springframework.security.web.access.AccessDeniedHandler
Handles access denied states and answers with a 403-FORBIDDEN status.
- Author:
- Eric Wündisch and Armin Müller
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.access.AccessDeniedException accessDeniedException) Custom handler method that creates a 403-FORBIDDEN status response if the token is valid but does not meet the permissions.
-
Constructor Details
-
CustomAccessDeniedHandler
public CustomAccessDeniedHandler()
-
-
Method Details
-
handle
public void handle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.access.AccessDeniedException accessDeniedException) Custom handler method that creates a 403-FORBIDDEN status response if the token is valid but does not meet the permissions.- Specified by:
handlein interfaceorg.springframework.security.web.access.AccessDeniedHandler- Parameters:
request- the request objectresponse- the response objectaccessDeniedException- the AccessDeniedException as object
-