Class PrincipalSupport

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

public final class PrincipalSupport extends Object
Helper class for accessing Principal information.
Since:
5.1.0
  • Constructor Details

    • PrincipalSupport

      private PrincipalSupport()
      Private Constructor.
  • Method Details

    • getPrincipalNames

      @Nonnull @Unmodifiable @NotLive public static Set<String> getPrincipalNames(@Nonnull Subject subject, @Nonnull Class<? extends Principal> claz)
      Gets all of the names inside the Principal collection of a given type from a Subject.
      Parameters:
      subject - input subject
      claz - type of Principal
      Returns:
      set of names from matching Principals
    • getPrincipalNames

      @Nonnull @Unmodifiable @NotLive public static Set<String> getPrincipalNames(@Nonnull AuthenticationResult result, @Nonnull Class<? extends Principal> claz)
      Gets all of the names inside the Principal collection of a given type from a Subject.
      Parameters:
      result - authentication result
      claz - type of Principal
      Returns:
      set of names from matching Principals
    • getPrincipalNames

      @Nonnull @Unmodifiable @NotLive public static Set<String> getPrincipalNames(@Nonnull AuthenticationContext authenticationContext, @Nonnull String flowId, @Nonnull Class<? extends Principal> claz)
      Gets all of the names inside the Principal collection of a given type from a Subject.
      Parameters:
      authenticationContext - authentication context
      flowId - login flow Id
      claz - type of Principal
      Returns:
      set of names from matching Principals
    • getPrincipalNames

      @Nonnull @Unmodifiable @NotLive public static Set<String> getPrincipalNames(@Nonnull MultiFactorAuthenticationContext mfaContext, @Nonnull String flowId, @Nonnull Class<? extends Principal> claz)
      Gets all of the names inside the Principal collection of a given type from a Subject.
      Parameters:
      mfaContext - multi-factor authentication context
      flowId - login flow Id
      claz - type of Principal
      Returns:
      set of names from matching Principals