public class InternalDirectoryUtilsImpl extends Object implements InternalDirectoryUtils
| Constructor and Description |
|---|
InternalDirectoryUtilsImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
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 as directoryId.
|
void |
validateGroupName(Group group,
String groupName)
Validates group name.
|
void |
validateUsername(String username)
Validates a username.
|
public void validateDirectoryForEntity(DirectoryEntity entity, Long directoryId)
InternalDirectoryUtilsvalidateDirectoryForEntity in interface InternalDirectoryUtilsentity - DirectoryEntitydirectoryId - directory ID to matchpublic void validateUsername(String username)
InternalDirectoryUtilsvalidateUsername in interface InternalDirectoryUtilsusername - username to validatepublic void validateCredential(User user, PasswordCredential credential, Set<PasswordConstraint> passwordConstraints, @Nullable String passwordComplexityMessage) throws InvalidCredentialException
InternalDirectoryUtilsvalidateCredential in interface InternalDirectoryUtilsuser - 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.InvalidCredentialException - If the credential failed validation.public void validateGroupName(Group group, String groupName)
InternalDirectoryUtilsvalidateGroupName in interface InternalDirectoryUtilsgroup - Group.groupName - Group name.Copyright © 2023 Atlassian. All rights reserved.