juneau-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Bognar (JIRA)" <j...@apache.org>
Subject [jira] [Created] (JUNEAU-108) AccessDeniedException should cause HTTP 401 response.
Date Wed, 01 May 2019 16:59:00 GMT
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:

{ 401: "*AccessDeniedException", 404: "EmptyResult*"}


This message was sent by Atlassian JIRA

View raw message