Class ShiroAuthenticationFeature

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

    public class ShiroAuthenticationFeature
    extends Object
    implements javax.ws.rs.core.Feature
    This type adds support for establishing Shiro Authentication in a JAX-RS container using native JAX-RS features, rather than relying on an external Servlet Container. As a result some common features of the ShiroFilter are not supported, but native JAX-RS containers (i.e. ones that don't support Servlets) are able to be used.

    Where possible we reuse types from the ShiroFeature, and where these overlap with types used in authorization we must register carefully, as 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 authorization.
    • Uses priorities to indicate that these are authentication extensions
    • Constructor Detail

      • ShiroAuthenticationFeature

        public ShiroAuthenticationFeature​(List<org.apache.shiro.realm.Realm> realms)
    • Method Detail

      • configure

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

        public void close()