Class DelegatingAccessDeniedHandler

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void handle​(javax.servlet.http.HttpServletRequest request, javax.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 Detail

      • DelegatingAccessDeniedHandler

        public DelegatingAccessDeniedHandler​(java.util.LinkedHashMap<java.lang.Class<? extends org.springframework.security.access.AccessDeniedException>,​AccessDeniedHandler> handlers,
                                             AccessDeniedHandler defaultHandler)
        Creates a new instance
        Parameters:
        handlers - a map of the AccessDeniedException class to the AccessDeniedHandler that should be used. Each is considered in the order they are specified and only the first AccessDeniedHandler is ued.
        defaultHandler - the default AccessDeniedHandler that should be used if none of the handlers matches.
    • Method Detail

      • handle

        public void handle​(javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response,
                           org.springframework.security.access.AccessDeniedException accessDeniedException)
                    throws java.io.IOException,
                           javax.servlet.ServletException
        Description copied from interface: AccessDeniedHandler
        Handles an access denied failure.
        Specified by:
        handle in interface AccessDeniedHandler
        Parameters:
        request - that resulted in an AccessDeniedException
        response - so that the user agent can be advised of the failure
        accessDeniedException - that caused the invocation
        Throws:
        java.io.IOException - in the event of an IOException
        javax.servlet.ServletException - in the event of a ServletException