
@FunctionalInterface public interface RealmMapper
| Modifier and Type | Field and Description |
|---|---|
static RealmMapper |
DEFAULT_REALM_MAPPER
A realm mapper which always falls back to a default realm.
|
| Modifier and Type | Method and Description |
|---|---|
static RealmMapper |
aggregate(RealmMapper... mappers)
Create an aggregate realm mapping strategy.
|
static RealmMapper |
aggregate(RealmMapper mapper1,
RealmMapper mapper2)
Create an aggregate realm mapping strategy.
|
String |
getRealmMapping(Principal principal,
Evidence evidence)
Get the realm mapping.
|
static RealmMapper |
matching(BiPredicate<? super Principal,? super Evidence> matchRule,
String realmName)
Create a realm mapper that matches when the given predicate matches.
|
static RealmMapper |
matchingEvidence(Predicate<? super Evidence> matchRule,
String realmName)
Create a realm mapper that matches when the given predicate matches the evidence.
|
static RealmMapper |
matchingEvidenceType(Class<? extends Evidence> evidenceType,
String realmName)
Create a realm mapper that matches when the evidence is of the given type.
|
static RealmMapper |
matchingPrincipal(Predicate<? super Principal> matchRule,
String realmName)
Create a realm mapper that matches when the given predicate matches the principal.
|
static RealmMapper |
matchingPrincipalType(Class<? extends Principal> principalType,
String realmName)
Create a realm mapper that matches when the principal is of the given type.
|
static RealmMapper |
single(String realmName)
Create a realm mapper that always maps to the given realm.
|
static final RealmMapper DEFAULT_REALM_MAPPER
String getRealmMapping(Principal principal, Evidence evidence)
null if the default realm should be used.principal - the authentication principal (or null if none is known for this authentication)evidence - the authentication evidence (or null if none is known for this authentication)null if no particular realm matches the authentication informationstatic RealmMapper single(String realmName)
realmName - the realm name to return, or null if the default realm should be usedrealmNamestatic RealmMapper matching(BiPredicate<? super Principal,? super Evidence> matchRule, String realmName)
matchRule - the match rule (must not be null)realmName - the realm name to return, or null to return the default realmnull)static RealmMapper matchingPrincipal(Predicate<? super Principal> matchRule, String realmName)
matchRule - the match rule (must not be null)realmName - the realm name to return, or null to return the default realmnull)static RealmMapper matchingPrincipalType(Class<? extends Principal> principalType, String realmName)
principalType - the principal type class (must not be null)realmName - the realm name to return, or null to return the default realmnull)static RealmMapper matchingEvidence(Predicate<? super Evidence> matchRule, String realmName)
matchRule - the match rule (must not be null)realmName - the realm name to return, or null to return the default realmnull)static RealmMapper matchingEvidenceType(Class<? extends Evidence> evidenceType, String realmName)
evidenceType - the evidence type class (must not be null)realmName - the realm name to return, or null to return the default realmnull)static RealmMapper aggregate(RealmMapper mapper1, RealmMapper mapper2)
mapper1 - the first mapper to try (must not be null)mapper2 - the second mapper to try (must not be null)null)static RealmMapper aggregate(RealmMapper... mappers)
mappers - the mappers to try (must not be null)null)Copyright © 2020 JBoss by Red Hat. All rights reserved.