Package org.apache.shiro.web.jaxrs
Class ExceptionMapper
- java.lang.Object
-
- org.apache.shiro.web.jaxrs.ExceptionMapper
-
- All Implemented Interfaces:
javax.ws.rs.ext.ExceptionMapper<AuthorizationException>
public class ExceptionMapper extends Object implements javax.ws.rs.ext.ExceptionMapper<AuthorizationException>
JAX-RS exception mapper used to map ShiroAuthorizationExceptions
to HTTP status codes.UnauthorizedException
will be mapped to 403, all others 401.- Since:
- 1.4
-
-
Constructor Summary
Constructors Constructor Description ExceptionMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
toResponse(AuthorizationException exception)
-
-
-
Constructor Detail
-
ExceptionMapper
public ExceptionMapper()
-
-
Method Detail
-
toResponse
public javax.ws.rs.core.Response toResponse(AuthorizationException exception)
- Specified by:
toResponse
in interfacejavax.ws.rs.ext.ExceptionMapper<AuthorizationException>
-
-