Class ShiroAuthorizationFeature

  • All Implemented Interfaces:
    javax.ws.rs.core.Feature

    @Capability(attribute={"objectClass:List<String>=\'javax.ws.rs.core.Feature\'","osgi.jaxrs.name=aries.shiro.authz"},
                namespace="osgi.service")
    @RequireJaxrsWhiteboard
    public class ShiroAuthorizationFeature
    extends Object
    implements javax.ws.rs.core.Feature
    This type mirrors ShiroFeature, by registering an ExceptionMapper, SubjectPrincipalRequestFilter and ShiroAnnotationFilterFeature.

    We cannot use the ShiroFeature directly because several of the extension types it registers are also used to enable authentication, and it is not allowed to register the same extension twice. Also the ShiroFeature does not make correct use of priorities when registering. This Feature therefore:

    • Avoids duplicate registrations with extension types that are also used in authentication.
    • Uses priorities to indicate that these are authorization extensions
    • Constructor Detail

      • ShiroAuthorizationFeature

        public ShiroAuthorizationFeature()
    • Method Detail

      • configure

        public boolean configure​(javax.ws.rs.core.FeatureContext fc)
        Specified by:
        configure in interface javax.ws.rs.core.Feature