Class ShiroFeature
java.lang.Object
org.apache.shiro.web.jaxrs.ShiroFeature
- All Implemented Interfaces:
javax.ws.rs.core.Feature
Shiro JAX-RS feature which includes
UnauthorizedExceptionExceptionMapper, SubjectPrincipalRequestFilter, and
ShiroAnnotationFilterFeature.
Typically, a JAX-RS Application class will include this Feature class in the
classes returned from Application.getClasses() method, for example:
public class SampleApplication extends Application {
@Override
public Set<Class<?>> getClasses() {
Set<Class<?>> classes = new HashSet<Class<?>>();
// register Shiro
classes.add(ShiroFeature.class);
...
return classes;
}
}
NOTE: Apache CXF requires this annotation on this feature (jersey and resteasy do not)- Since:
- 1.4
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ShiroFeature
public ShiroFeature()
-
-
Method Details
-
configure
- Specified by:
configurein interfacejavax.ws.rs.core.Feature
-