Class InexactPrincipalEvalPredicateFactory
java.lang.Object
net.shibboleth.idp.authn.principal.impl.InexactPrincipalEvalPredicateFactory
- All Implemented Interfaces:
PrincipalEvalPredicateFactory
public class InexactPrincipalEvalPredicateFactory
extends Object
implements 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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
Implementation of an inexact-matching predicate. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the matching rules to apply.getPredicate
(Principal candidate) Get a predicate to compare a candidatePrincipal
object against aPrincipalSupportingComponent
for a "match", where the definition of a match is implementation-specific.void
setMatchingRules
(Map<String, Collection<String>> rules) Set the matching rules to apply.
-
Field Details
-
matchingRules
Rules for matching.
-
-
Constructor Details
-
InexactPrincipalEvalPredicateFactory
InexactPrincipalEvalPredicateFactory()Constructor.
-
-
Method Details
-
getMatchingRules
Get the matching rules to apply.- Returns:
- a mutable multimap of the matching rules to apply
-
setMatchingRules
Set the matching rules to apply.The input is a map of sets for bean compatibility.
- Parameters:
rules
- matching rules
-
getPredicate
Get a predicate to compare a candidatePrincipal
object against aPrincipalSupportingComponent
for a "match", where the definition of a match is implementation-specific.- Specified by:
getPredicate
in interfacePrincipalEvalPredicateFactory
- Parameters:
candidate
- aPrincipal
object to evaluate- Returns:
- a
PrincipalEvalPredicate
implementing custom matching rules
-