Class AccessDeniedException
java.lang.Object
callofproject.dev.project.exception.AccessDeniedException
- All Implemented Interfaces:
org.springframework.security.web.access.AccessDeniedHandler
public class AccessDeniedException
extends Object
implements org.springframework.security.web.access.AccessDeniedHandler
Custom access denied handler.
This class is responsible for handling Access Denied exceptions in Spring Security.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
handle
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.access.AccessDeniedException accessDeniedException) Handles an access denied failure.
-
Constructor Details
-
AccessDeniedException
public AccessDeniedException()Default constructor.
-
-
Method Details
-
handle
public void handle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.access.AccessDeniedException accessDeniedException) throws IOException, jakarta.servlet.ServletException Handles an access denied failure.- Specified by:
handle
in interfaceorg.springframework.security.web.access.AccessDeniedHandler
- Parameters:
request
- HttpServletRequest that resulted in an AccessDeniedExceptionresponse
- HttpServletResponse so that the user-agent can be advised of the failureaccessDeniedException
- AccessDeniedException that caused the invocation- Throws:
IOException
jakarta.servlet.ServletException
-