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
    Constructor
    Description
     
  • 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)
    Custom handler method that creates a 403-FORBIDDEN status response if the token is valid but does not meet the permissions.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      handle in interface org.springframework.security.web.access.AccessDeniedHandler
      Parameters:
      request - the request object
      response - the response object
      accessDeniedException - the AccessDeniedException as object