Package com.atlassian.crowd.directory
Interface InternalDirectoryUtils
- All Known Implementing Classes:
InternalDirectoryUtilsImpl
public interface InternalDirectoryUtils
Internal Directory utility.
-
Method Summary
Modifier and TypeMethodDescriptionvoidvalidateCredential(User user, PasswordCredential credential, Set<PasswordConstraint> passwordConstraints, String message) Validates a password credential for a given user against the given set of constraints.voidvalidateDirectoryForEntity(DirectoryEntity entity, Long directoryId) Validates that the directory entity has the same directory ID asdirectoryId.voidvalidateGroupName(Group group, String groupName) Validates group name.voidvalidateUsername(String username) Validates a username.
-
Method Details
-
validateDirectoryForEntity
Validates that the directory entity has the same directory ID asdirectoryId.- Parameters:
entity- DirectoryEntitydirectoryId- directory ID to match- Throws:
IllegalArgumentException- if the directory IDs do not match
-
validateUsername
Validates a username.- Parameters:
username- username to validate- Throws:
IllegalArgumentException- if the username is not valid
-
validateCredential
void validateCredential(User user, PasswordCredential credential, Set<PasswordConstraint> passwordConstraints, String message) throws InvalidCredentialException Validates a password credential for a given user against the given set of constraints.- 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.message- Password complexity message (optional). If null/blank, a default message is used.- Throws:
InvalidCredentialException- If the credential failed validation.
-
validateGroupName
Validates group name.- Parameters:
group- Group.groupName- Group name.
-