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
    Constructor
    Description
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    handle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.access.AccessDeniedException accessDeniedException)
    Handles an access denied failure.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 interface org.springframework.security.web.access.AccessDeniedHandler
      Parameters:
      request - HttpServletRequest that resulted in an AccessDeniedException
      response - HttpServletResponse so that the user-agent can be advised of the failure
      accessDeniedException - AccessDeniedException that caused the invocation
      Throws:
      IOException
      jakarta.servlet.ServletException