Class PolymorphicAuthValueFactoryProvider<T extends Principal>

java.lang.Object
org.glassfish.jersey.server.internal.inject.AbstractValueParamProvider
io.dropwizard.auth.PolymorphicAuthValueFactoryProvider<T>
Type Parameters:
T - the type acting as the superclass from which injected principals inherit
All Implemented Interfaces:
org.glassfish.jersey.server.spi.internal.ValueParamProvider

@Singleton public class PolymorphicAuthValueFactoryProvider<T extends Principal> extends org.glassfish.jersey.server.internal.inject.AbstractValueParamProvider
Value factory provider supporting injection of a hierarchy of Principal subclasses by the Auth annotation.
  • Field Details

    • principalClassSet

      protected final Set<Class<? extends T extends Principal>> principalClassSet
      Set of provided Principal subclasses.
  • Constructor Details

    • PolymorphicAuthValueFactoryProvider

      @Inject public PolymorphicAuthValueFactoryProvider(org.glassfish.jersey.server.internal.inject.MultivaluedParameterExtractorProvider mpep, PolymorphicAuthValueFactoryProvider.PrincipalClassSetProvider<T> principalClassSetProvider)
      Principal value factory provider injection constructor.
      Parameters:
      mpep - multivalued parameter extractor provider
      principalClassSetProvider - provider(s) of the principal class
  • Method Details

    • createValueProvider

      protected @Nullable Function<org.glassfish.jersey.server.ContainerRequest,?> createValueProvider(org.glassfish.jersey.server.model.Parameter parameter)
      Specified by:
      createValueProvider in class org.glassfish.jersey.server.internal.inject.AbstractValueParamProvider