You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@juneau.apache.org by "James Bognar (JIRA)" <ji...@apache.org> on 2019/05/01 16:59:00 UTC

[jira] [Created] (JUNEAU-108) AccessDeniedException should cause HTTP 401 response.

James Bognar created JUNEAU-108:
-----------------------------------

             Summary: AccessDeniedException should cause HTTP 401 response.
                 Key: JUNEAU-108
                 URL: https://issues.apache.org/jira/browse/JUNEAU-108
             Project: Juneau
          Issue Type: Improvement
          Components: Code
    Affects Versions: 8.0.0
            Reporter: James Bognar


If a method throws org.springframework.security.access.AccessDeniedException, it should immediately rethrow an Unauthorized exception.  

This exception is thrown when @Secured() is used on a method in Spring.  This would help with Spring integration.

Perhaps we could define a setting that allows you to specify default exception responses based on exception name patterns:

e.g.
{ 401: "*AccessDeniedException", 404: "EmptyResult*"}

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)