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)
InternalDirectoryUtils
validateDirectoryForEntity
in interface InternalDirectoryUtils
entity
- DirectoryEntitydirectoryId
- directory ID to matchpublic void validateUsername(String username)
InternalDirectoryUtils
validateUsername
in interface InternalDirectoryUtils
username
- username to validatepublic void validateCredential(User user, PasswordCredential credential, Set<PasswordConstraint> passwordConstraints, @Nullable String passwordComplexityMessage) throws InvalidCredentialException
InternalDirectoryUtils
validateCredential
in interface InternalDirectoryUtils
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.InvalidCredentialException
- If the credential failed validation.public void validateGroupName(Group group, String groupName)
InternalDirectoryUtils
validateGroupName
in interface InternalDirectoryUtils
group
- Group.groupName
- Group name.Copyright © 2020 Atlassian. All rights reserved.