Class UnauthorizedExceptionExceptionMapper

java.lang.Object
org.apache.shiro.web.jaxrs.UnauthorizedExceptionExceptionMapper
All Implemented Interfaces:
javax.ws.rs.ext.ExceptionMapper<org.apache.shiro.authz.UnauthorizedException>

public class UnauthorizedExceptionExceptionMapper extends Object implements javax.ws.rs.ext.ExceptionMapper<org.apache.shiro.authz.UnauthorizedException>
JAX-RS exception mapper used to map Shiro UnauthorizedException to HTTP status codes. UnauthorizedException will be mapped to 401.
Since:
1.4
  • Constructor Details

    • UnauthorizedExceptionExceptionMapper

      public UnauthorizedExceptionExceptionMapper()
  • Method Details

    • toResponse

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