public class PersonDirectoryPrincipalResolver extends Object implements PrincipalResolver
Principal.getAttributes() are populated by the results of the
query and the principal ID may optionally be set by proving an attribute whose first non-null value is used;
otherwise the credential ID is used for the principal ID.| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
logger
Log instance.
|
| Constructor and Description |
|---|
PersonDirectoryPrincipalResolver() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
extractPrincipalId(Credential credential)
Extracts the id of the user from the provided credential.
|
Principal |
resolve(Credential credential)
Resolves a principal from the given credential using an arbitrary strategy.
|
void |
setAttributeRepository(org.jasig.services.persondir.IPersonAttributeDao attributeRepository) |
void |
setPrincipalAttributeName(String attribute)
Sets the name of the attribute whose first non-null value should be used for the principal ID.
|
void |
setReturnNullIfNoAttributes(boolean returnNullIfNoAttributes) |
boolean |
supports(Credential credential)
Determines whether this instance supports principal resolution from the given credential.
|
public boolean supports(Credential credential)
PrincipalResolverPrincipalResolver.resolve(org.jasig.cas.authentication.Credential).supports in interface PrincipalResolvercredential - The credential to check for support.public final Principal resolve(Credential credential)
PrincipalResolverresolve in interface PrincipalResolvercredential - Source credential.public final void setAttributeRepository(org.jasig.services.persondir.IPersonAttributeDao attributeRepository)
public void setReturnNullIfNoAttributes(boolean returnNullIfNoAttributes)
public void setPrincipalAttributeName(String attribute)
attribute - Name of attribute containing principal ID.protected String extractPrincipalId(Credential credential)
credential - the credential provided by the user.Copyright © 2004-2015 Apereo. All Rights Reserved.