Package org.apache.shiro.web.jaxrs
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.ResponsetoResponse(org.apache.shiro.authz.UnauthorizedException exception)
-
Constructor Details
-
UnauthorizedExceptionExceptionMapper
public UnauthorizedExceptionExceptionMapper()
-
-
Method Details
-
toResponse
public javax.ws.rs.core.Response toResponse(org.apache.shiro.authz.UnauthorizedException exception) - Specified by:
toResponsein interfacejavax.ws.rs.ext.ExceptionMapper<org.apache.shiro.authz.UnauthorizedException>
-