Class ExceptionMapper

  • All Implemented Interfaces:
    javax.ws.rs.ext.ExceptionMapper<org.apache.shiro.authz.AuthorizationException>

    public class ExceptionMapper
    extends Object
    implements javax.ws.rs.ext.ExceptionMapper<org.apache.shiro.authz.AuthorizationException>
    JAX-RS exception mapper used to map Shiro AuthorizationExceptions to HTTP status codes. UnauthorizedException will be mapped to 403, all others 401.
    Since:
    1.4
    • Method Detail

      • toResponse

        public javax.ws.rs.core.Response toResponse​(org.apache.shiro.authz.AuthorizationException exception)
        Specified by:
        toResponse in interface javax.ws.rs.ext.ExceptionMapper<org.apache.shiro.authz.AuthorizationException>