public class ChainingPrincipalResolver
extends java.lang.Object
implements org.apereo.cas.authentication.principal.PrincipalResolver
Credential whose ID is the
resolved principal ID of the previous resolver.
A common use case for this component is resolving a temporary principal ID from an X.509 credential followed by a search (e.g. LDAP, database) for the final principal based on the temporary ID.
| Constructor and Description |
|---|
ChainingPrincipalResolver() |
| Modifier and Type | Method and Description |
|---|---|
org.apereo.services.persondir.IPersonAttributeDao |
getAttributeRepository() |
org.apereo.cas.authentication.principal.Principal |
resolve(org.apereo.cas.authentication.Credential credential,
org.apereo.cas.authentication.principal.Principal principal,
org.apereo.cas.authentication.AuthenticationHandler handler)
Resolves a credential by delegating to each of the configured resolvers in sequence.
|
void |
setChain(java.util.List<org.apereo.cas.authentication.principal.PrincipalResolver> chain)
Sets the resolver chain.
|
void |
setChain(org.apereo.cas.authentication.principal.PrincipalResolver... chain) |
boolean |
supports(org.apereo.cas.authentication.Credential credential)
Determines whether the credential is supported by this component by delegating to the first configured
resolver in the chain.
|
java.lang.String |
toString() |
public void setChain(java.util.List<org.apereo.cas.authentication.principal.PrincipalResolver> chain)
Credential.getId() alone;
PersonDirectoryPrincipalResolver notably meets that requirement.chain - List of delegate resolvers that are invoked in a chain.public void setChain(org.apereo.cas.authentication.principal.PrincipalResolver... chain)
public org.apereo.cas.authentication.principal.Principal resolve(org.apereo.cas.authentication.Credential credential,
org.apereo.cas.authentication.principal.Principal principal,
org.apereo.cas.authentication.AuthenticationHandler handler)
resolve in interface org.apereo.cas.authentication.principal.PrincipalResolvercredential - Authenticated credential.principal - Authenticated principal, if any.public boolean supports(org.apereo.cas.authentication.Credential credential)
supports in interface org.apereo.cas.authentication.principal.PrincipalResolvercredential - The credential to check for support.public java.lang.String toString()
toString in class java.lang.Objectpublic org.apereo.services.persondir.IPersonAttributeDao getAttributeRepository()
getAttributeRepository in interface org.apereo.cas.authentication.principal.PrincipalResolver