com.atlassian.crowd.integration.directory.delegated
Class DelegatedAuthenticationDirectory
java.lang.Object
com.atlassian.crowd.integration.directory.internal.InternalDirectory
com.atlassian.crowd.integration.directory.delegated.DelegatedAuthenticationDirectory
- All Implemented Interfaces:
- BatchingRemoteDirectory, RemoteDirectory, AttributeAware
public class DelegatedAuthenticationDirectory
- extends InternalDirectory
This implementation of a RemoteDirectory provides delegated authentication to an underlying remote
LDAP implementation.
In essence this means that a User's groups and roles are managed internally to Crowd, but all actions regarding
authentication are delegated to the remote directory.
| Fields inherited from class com.atlassian.crowd.integration.directory.internal.InternalDirectory |
ATTRIBUTE_PASSWORD_HISTORY_COUNT, ATTRIBUTE_PASSWORD_MAX_ATTEMPTS, ATTRIBUTE_PASSWORD_MAX_CHANGE_TIME, ATTRIBUTE_PASSWORD_REGEX, ATTRIBUTE_USER_ENCRYPTION_METHOD, attributes, DESCRIPTIVE_NAME, directoryDAO, groupDAO, i18nHelper, logger, membershipDAO, passwordEncoderFactory, passwordHelper, userDAO |
| Methods inherited from class com.atlassian.crowd.integration.directory.internal.InternalDirectory |
addAllGroups, addAllUsers, addAllUsersToGroup, addGroup, addGroupToGroup, addUser, addUserToGroup, currentPrincipalInvalidPasswordAttempts, findGroupByName, findGroupsByNames, findGroupWithAttributesByName, findUserByName, findUsersByNames, findUserWithAttributesByName, getAttribute, getAttributeNames, getAttributes, getDirectoryId, hasAttribute, isGroupDirectGroupMember, isUserDirectGroupMember, removeGroup, removeGroupAttributes, removeGroupFromGroup, removeUser, removeUserAttributes, removeUserFromGroup, renameGroup, renameUser, requiresPasswordChange, searchGroupRelationships, searchGroups, searchUsers, setAttributes, setDirectoryDAO, setDirectoryId, setGroupDAO, setI18nHelper, setMembershipDAO, setPasswordEncoderFactory, setPasswordHelper, setUserDAO, storeGroupAttributes, storeUserAttributes, supportsNestedGroups, updateGroup, updateUser |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DELEGATED_DIRECTORY_TYPE
public static final java.lang.String DELEGATED_DIRECTORY_TYPE
- See Also:
- Constant Field Values
DelegatedAuthenticationDirectory
public DelegatedAuthenticationDirectory()
authenticate
public User authenticate(java.lang.String name,
PasswordCredential credential)
throws ObjectNotFoundException,
InactiveAccountException,
InvalidAuthenticationException
- Description copied from interface:
RemoteDirectory
- Authenticates a
user with the directory store.
- Specified by:
authenticate in interface RemoteDirectory- Overrides:
authenticate in class InternalDirectory
- Parameters:
name - The name of the user (username).credential - The supplied credentials (password).
- Returns:
- user entity.
- Throws:
InvalidAuthenticationException - if the user was unable to be created in the InternalDirectory after successful authentication
with LDAP (eg. the LDAP User is not a valid Internal User), this exception may be thrown.
ObjectNotFoundException - The user wth the supplied name does not exist.
InactiveAccountException - The supplied user is inactive.
getEncoder
protected PasswordEncoder getEncoder()
- Overrides:
getEncoder in class InternalDirectory
updateUserCredential
public void updateUserCredential(java.lang.String userName,
PasswordCredential credential)
throws ObjectNotFoundException,
InvalidCredentialException
- Description copied from interface:
RemoteDirectory
- Updates the
password for a user.
- Specified by:
updateUserCredential in interface RemoteDirectory- Overrides:
updateUserCredential in class InternalDirectory
- Parameters:
userName - The name of the user (username).credential - The new credential (password).
- Throws:
ObjectNotFoundException - The user does not exist.
InvalidCredentialException - The supplied credential is invalid.
testConnection
public void testConnection()
throws DirectoryAccessException
- Description copied from class:
InternalDirectory
- Does nothing, connection is determined by the ability to communicate with the database. Crowd
wouldn't have started if the database connection failed.
- Specified by:
testConnection in interface RemoteDirectory- Overrides:
testConnection in class InternalDirectory
- Throws:
DirectoryAccessException - An unknown wire exception occurred.
encryptCredentials
protected void encryptCredentials(java.util.List credentials)
validateRegex
protected void validateRegex(PasswordCredential credential)
throws InvalidCredentialException
- Throws:
InvalidCredentialException
getDelegatedDirectory
protected RemoteDirectory getDelegatedDirectory()
throws DirectoryInstantiationException
- Throws:
DirectoryInstantiationException
getDescriptiveName
public java.lang.String getDescriptiveName()
- Description copied from interface:
RemoteDirectory
- Returns a descriptive name for the type of directory.
- Specified by:
getDescriptiveName in interface RemoteDirectory- Overrides:
getDescriptiveName in class InternalDirectory
- Returns:
- descriptive name.
setDirectoryInstanceLoader
public void setDirectoryInstanceLoader(DirectoryInstanceLoader directoryInstanceLoader)
Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.