Class PrincipalInResultPredicate

java.lang.Object
net.shibboleth.idp.authn.context.logic.AbstractAuthenticationResultPredicate
net.shibboleth.idp.authn.context.logic.PrincipalInResultPredicate
All Implemented Interfaces:
Predicate<ProfileRequestContext>

public class PrincipalInResultPredicate extends AbstractAuthenticationResultPredicate
Condition that checks for the presence of one or more Principal instances in a Subject in any of the AuthenticationResult instances evaluated by the parent class.
Since:
5.2.0
  • Field Details

    • principals

      @Nonnull private Set<Principal> principals
      Principals to check for.
  • Constructor Details

    • PrincipalInResultPredicate

      public PrincipalInResultPredicate()
      Constructor.
  • Method Details

    • setPrincipals

      public void setPrincipals(@Nullable Collection<Principal> prins)
      Sets the principals to check for.
      Parameters:
      prins - principals to check for
    • doMatch

      protected boolean doMatch(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull AuthenticationResult result)
      Match returns true iff at least one of the candidates is found in this result's Subject.
      Specified by:
      doMatch in class AbstractAuthenticationResultPredicate
      Parameters:
      profileRequestContext - profile request context
      result - result to evaluate
      Returns:
      as above