Package com.atlassian.crowd.directory
Class InternalDirectoryUtilsImpl
java.lang.Object
com.atlassian.crowd.directory.InternalDirectoryUtilsImpl
- All Implemented Interfaces:
InternalDirectoryUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
validateCredential
(User user, PasswordCredential credential, Set<PasswordConstraint> passwordConstraints, String passwordComplexityMessage) Validates a password credential for a given user against the given set of constraints.void
validateDirectoryForEntity
(DirectoryEntity entity, Long directoryId) Validates that the directory entity has the same directory ID asdirectoryId
.void
validateGroupName
(Group group, String groupName) Validates group name.void
validateUsername
(String username) Validates a username.
-
Constructor Details
-
InternalDirectoryUtilsImpl
public InternalDirectoryUtilsImpl()
-
-
Method Details
-
validateDirectoryForEntity
Description copied from interface:InternalDirectoryUtils
Validates that the directory entity has the same directory ID asdirectoryId
.- Specified by:
validateDirectoryForEntity
in interfaceInternalDirectoryUtils
- Parameters:
entity
- DirectoryEntitydirectoryId
- directory ID to match
-
validateUsername
Description copied from interface:InternalDirectoryUtils
Validates a username.- Specified by:
validateUsername
in interfaceInternalDirectoryUtils
- Parameters:
username
- username to validate
-
validateCredential
public void validateCredential(User user, PasswordCredential credential, Set<PasswordConstraint> passwordConstraints, @Nullable String passwordComplexityMessage) throws InvalidCredentialException Description copied from interface:InternalDirectoryUtils
Validates a password credential for a given user against the given set of constraints.- Specified by:
validateCredential
in interfaceInternalDirectoryUtils
- Parameters:
user
- the User to validate the credential forcredential
- Password credential. If encrypted the credential is considered valid.passwordConstraints
- The type of validation to perform. Will contain a regex, a password score, or both.passwordComplexityMessage
- Password complexity message (optional). If null/blank, a default message is used.- Throws:
InvalidCredentialException
- If the credential failed validation.
-
validateGroupName
Description copied from interface:InternalDirectoryUtils
Validates group name.- Specified by:
validateGroupName
in interfaceInternalDirectoryUtils
- Parameters:
group
- Group.groupName
- Group name.
-