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.
| Modifier and Type | Class and Description |
|---|---|
private class |
InexactPrincipalEvalPredicateFactory.InexactMatchPredicate
Implementation of an inexact-matching predicate.
|
| Modifier and Type | Field and Description |
|---|---|
private com.google.common.collect.HashMultimap<String,String> |
matchingRules
Rules for matching.
|
| Constructor and Description |
|---|
InexactPrincipalEvalPredicateFactory()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) com.google.common.collect.Multimap<String,String> |
getMatchingRules()
Get the matching rules to apply.
|
PrincipalEvalPredicate |
getPredicate(Principal candidate) |
void |
setMatchingRules(Map<String,Collection<String>> rules)
Set the matching rules to apply.
|
@Nonnull @NonnullElements private final com.google.common.collect.HashMultimap<String,String> matchingRules
InexactPrincipalEvalPredicateFactory()
@Nonnull @NonnullElements @Live com.google.common.collect.Multimap<String,String> getMatchingRules()
public void setMatchingRules(@Nonnull@NonnullElements Map<String,Collection<String>> rules)
The input is a map of sets for bean compatibility.
rules - matching rules@Nonnull public PrincipalEvalPredicate getPredicate(@Nonnull Principal candidate)
getPredicate in interface PrincipalEvalPredicateFactoryCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.