public class UserDirectoryUserAuthority extends GenericService implements UserAuthority2, atg.security.CachingUserAuthority
This user authority does not provide login support. If you need login support from one or more of its members, you should create a UserDirectoryLoginUserAuthority for each required user directory.
UserAuthority
,
UserDirectoryLoginUserAuthority
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION |
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
UserDirectoryUserAuthority() |
Modifier and Type | Method and Description |
---|---|
void |
addAuthenticationFailedListener(DataListener listener)
Adds a listener for "authentication failed" events.
|
void |
addAuthenticationSucceededListener(DataListener listener)
Adds a listener for "authentication succeeded" events.
|
static void |
addPrincipalResolver(java.lang.String pName,
atg.userdirectory.PrincipalResolver pResolver)
Adds a new identity resolver.
|
void |
addSpecialPersona(Persona pPersona)
Adds the indicated persona to the special persona list.
|
atg.userdirectory.AccessRightLookup |
getAccessRightLookup()
Returns property
AccessRightLookup |
int |
getCacheLifetime()
Returns the lifetime of cached persona information.
|
Persona |
getPersona(java.lang.Object pId)
Returns a persona for the given ID object.
|
Persona |
getPersona(java.lang.String pDirectoryName,
java.lang.Class pPrincipalType,
java.lang.String pPrincipalName)
Returns the persona for the named principal in the named directory.
|
Persona |
getPersona(UserDirectory pDirectory,
java.security.Principal pPrincipal)
Deprecated.
|
Persona |
getPersonaForAccessRight(java.lang.String pAccessRightName,
UserDirectory pUserDirectory)
Gets a persona for the given access right
|
Persona |
getPersonaForPrincipal(java.security.Principal pPrincipal)
Given a user directory principal, return its persona.
|
java.security.Principal |
getPrincipal(Persona pPersona)
Deprecated.
|
DirectoryPrincipal |
getPrincipalForPersona(Persona pPersona)
Returns the Principal from the user directory that was used
to create the Persona.
|
Persona[] |
getSpecialPersonae()
Returns the special personae supported by this user authority.
|
boolean |
getSupportsEveryone()
If true, this user authority supports the "EVERYONE" special
persona.
|
java.lang.String |
getUserAuthorityName()
Returns the name of the user authority.
|
ServiceMap |
getUserDirectories()
Returns the set of user directories that this user authority
works with.
|
UserDirectory |
getUserDirectory(Persona pPersona)
Given a persona, returns the user directory from which it was
derived.
|
java.lang.String |
getUserDirectoryName(Persona pPersona)
Given a persona, returns the name of the user directory from
the user directory service map.
|
void |
invalidateAllPersonae()
Invalidates all cached persona information produced by this directory.
|
void |
invalidatePersona(Persona pPersona)
Invalidates the cached persona information, forcing a re-verification
of the existance of the persona as well as its internal cache
information.
|
void |
removeAuthenticationFailedListener(DataListener listener)
Removes a listener for "authentication failed" events.
|
void |
removeAuthenticationSucceededListener(DataListener listener)
Removes a listener for "authentication succeeded" events.
|
void |
removeSpecialPersona(Persona pPersona)
Removes the indicated persona from the special persona list.
|
void |
setAccessRightLookup(atg.userdirectory.AccessRightLookup pAccessRightLookup)
Sets property
accessRightLookup |
void |
setCacheLifetime(int pLifetimeSecs)
Changes the lifetime of cached persona information.
|
void |
setPasswordHasher(PasswordHasher pPasswordHasher)
Changes the password hasher used by this user authority.
|
void |
setSpecialPersonae(Persona[] pPersonae)
Changes the set of special personae supported by this user authority.
|
void |
setSupportsEveryone(boolean pSupported)
If set to true, this adds the "EVERYONE" special persona to the
list of special personae supported by this user authority.
|
void |
setUserAuthorityName(java.lang.String pNewName)
Changes the name of this authority.
|
void |
setUserDirectories(ServiceMap pDirectoryMap)
Changes the set of user directories that this user authority
works with.
|
java.lang.String |
toString() |
void |
userDestroyed(User user)
Called by a User object when it is destroyed.
|
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public void setAccessRightLookup(atg.userdirectory.AccessRightLookup pAccessRightLookup)
accessRightLookup
pAccessRightlookup
- service that looks up access rightspublic atg.userdirectory.AccessRightLookup getAccessRightLookup()
AccessRightLookup
public int getCacheLifetime()
If you need to ensure that a persona is up-to-date, you can
force reloading of the cached data by calling
UserDirectoryUserAuthority.invalidatePersona()
.
invalidatePersona
public void setCacheLifetime(int pLifetimeSecs)
If you need to ensure that a persona is up-to-date, you can
force reloading of the cached data by calling
UserDirectoryUserAuthority.invalidatePersona()
.
invalidatePersona
public void setUserAuthorityName(java.lang.String pNewName)
public void setPasswordHasher(PasswordHasher pPasswordHasher)
public ServiceMap getUserDirectories()
public void setUserDirectories(ServiceMap pDirectoryMap)
public boolean getSupportsEveryone()
public void setSupportsEveryone(boolean pSupported)
public void setSpecialPersonae(Persona[] pPersonae)
public static void addPrincipalResolver(java.lang.String pName, atg.userdirectory.PrincipalResolver pResolver)
public java.security.Principal getPrincipal(Persona pPersona)
getPrincipalForPersona()
.public DirectoryPrincipal getPrincipalForPersona(Persona pPersona)
public Persona getPersona(java.lang.String pDirectoryName, java.lang.Class pPrincipalType, java.lang.String pPrincipalName)
public Persona getPersona(UserDirectory pDirectory, java.security.Principal pPrincipal)
getPersonaForPrincipal
public Persona getPersonaForPrincipal(java.security.Principal pPrincipal)
public Persona getPersonaForAccessRight(java.lang.String pAccessRightName, UserDirectory pUserDirectory)
pAccessRightName
- the name of the access right to get the persona
ofpUserDirectory
- the user directory that contains the access rightpublic UserDirectory getUserDirectory(Persona pPersona)
public java.lang.String getUserDirectoryName(Persona pPersona)
public void invalidatePersona(Persona pPersona)
If you need to invalidate the entire identity cache, use invalidateAllPersonae().
invalidatePersona
in interface atg.security.CachingUserAuthority
invalidateAllPersonae()
public void invalidateAllPersonae()
invalidateAllPersonae
in interface atg.security.CachingUserAuthority
invalidatePersona(atg.security.Persona)
public void addSpecialPersona(Persona pPersona)
public void removeSpecialPersona(Persona pPersona)
public java.lang.String getUserAuthorityName()
getUserAuthorityName
in interface UserAuthority
public void userDestroyed(User user)
userDestroyed
in interface UserAuthority
public Persona getPersona(java.lang.Object pId)
getPersona
in interface UserAuthority
public void addAuthenticationSucceededListener(DataListener listener)
addAuthenticationSucceededListener
in interface UserAuthority
public void removeAuthenticationSucceededListener(DataListener listener)
removeAuthenticationSucceededListener
in interface UserAuthority
public void addAuthenticationFailedListener(DataListener listener)
addAuthenticationFailedListener
in interface UserAuthority
public void removeAuthenticationFailedListener(DataListener listener)
removeAuthenticationFailedListener
in interface UserAuthority
public Persona[] getSpecialPersonae()
getSpecialPersonae
in interface UserAuthority2
public java.lang.String toString()
toString
in class java.lang.Object