Class InexactPrincipalEvalPredicateFactory

  • All Implemented Interfaces:
    net.shibboleth.idp.authn.principal.PrincipalEvalPredicateFactory

    public class InexactPrincipalEvalPredicateFactory
    extends Object
    implements net.shibboleth.idp.authn.principal.PrincipalEvalPredicateFactory
    PrincipalEvalPredicateFactory that implements inexact matching of principals, based on an arbitrary set of "matches" configured at runtime.

    Matching is based on string equality between two principals via the Principal.getName() method.

    This component implements essentially arbitrary comparison rules by being unaware of the actual semantics implied by a match. For example, a given instance of the component could be configured with rules for matching principals that are "at least as good as" or "better than" a candidate value, but the component doesn't know or care about that meaning.

    • Field Detail

      • matchingRules

        @Nonnull
        @NonnullElements
        private final HashMultimap<String,​String> matchingRules
        Rules for matching.
    • Constructor Detail

      • InexactPrincipalEvalPredicateFactory

        InexactPrincipalEvalPredicateFactory()
        Constructor.
    • Method Detail

      • getMatchingRules

        @Nonnull
        @NonnullElements
        @Live
        Multimap<String,​String> getMatchingRules()
        Get the matching rules to apply.
        Returns:
        a mutable multimap of the matching rules to apply
      • setMatchingRules

        public void setMatchingRules​(@Nonnull @NonnullElements
                                     Map<String,​Collection<String>> rules)
        Set the matching rules to apply.

        The input is a map of sets for bean compatibility.

        Parameters:
        rules - matching rules
      • getPredicate

        @Nonnull
        public net.shibboleth.idp.authn.principal.PrincipalEvalPredicate getPredicate​(@Nonnull
                                                                                      Principal candidate)
        Specified by:
        getPredicate in interface net.shibboleth.idp.authn.principal.PrincipalEvalPredicateFactory