Class PrincipalServiceManager

java.lang.Object
net.shibboleth.idp.authn.principal.PrincipalServiceManager

public class PrincipalServiceManager extends Object
Manages and exposes instances of the PrincipalService interface.
Since:
4.1.0
  • Field Details

    • log

      @Nonnull private final org.slf4j.Logger log
      Class logger.
    • classIndexedMap

      @Nonnull private final Map<Class<?>,PrincipalService<?>> classIndexedMap
      Service index by class.
    • idIndexedMap

      @Nonnull private final Map<String,PrincipalService<?>> idIndexedMap
      Service index by ID.
  • Constructor Details

  • Method Details

    • all

      Get all of the registered services.
      Returns:
      all registered services
    • byClass

      @Nullable public <T extends Principal> PrincipalService<T> byClass(@Nonnull Class<T> claz)
      Get a PrincipalService by type.
      Type Parameters:
      T - class type
      Parameters:
      claz - class type
      Returns:
      service for the type, or null
    • principalFromString

      @Nullable public Principal principalFromString(@Nonnull @NotEmpty String s)
      Manufacture a Principal from a string of the format "type/value" where type matches the ID of a PrincipalService and the value is supplied to a single-arg String constructor if one exists.
      Parameters:
      s - the delimited form above
      Returns:
      the new object or null