Package org.passay
Class PasswordData
java.lang.Object
org.passay.PasswordData
Contains password related information used by rules to perform password validation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final OriginOrigin of this password.private final UnicodeStringStores the password.Password references.private final UnicodeStringStores the username. -
Constructor Summary
ConstructorsConstructorDescriptionPasswordData(CharSequence password) Creates a new password data.PasswordData(CharSequence username, CharSequence password) Creates a new password data.PasswordData(CharSequence username, CharSequence password, List<Reference> references) Creates a new password data.PasswordData(CharSequence username, CharSequence password, Origin origin) Creates a new password data.PasswordData(CharSequence username, CharSequence password, Origin origin, List<Reference> references) Creates a new password data.PasswordData(CharSequence username, CharSequence password, Origin origin, Reference... references) Creates a new password data.PasswordData(CharSequence username, CharSequence password, Reference... references) Creates a new password data.PasswordData(CharSequence password, Origin origin) Creates a new password data.PasswordData(UnicodeString password) Creates a new password data.PasswordData(UnicodeString password, Origin origin) Creates a new password data.PasswordData(UnicodeString username, UnicodeString password) Creates a new password data.PasswordData(UnicodeString username, UnicodeString password, List<Reference> references) Creates a new password data.PasswordData(UnicodeString username, UnicodeString password, Origin origin) Creates a new password data.PasswordData(UnicodeString username, UnicodeString password, Origin origin, List<Reference> references) Creates a new password data.PasswordData(UnicodeString username, UnicodeString password, Origin origin, Reference... references) Creates a new password data.PasswordData(UnicodeString username, UnicodeString password, Reference... references) Creates a new password data. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the memory of the underlying objects in this password data.static PasswordDatacopy(PasswordData data) Returns a new password data initialized with the supplied data.Returns the origin.Returns the password.Returns the password references.getPasswordReferences(Class<T> type) Returns the password references that match the supplied reference type.Returns the username.toString()
-
Field Details
-
password
Stores the password. -
username
Stores the username. -
passwordReferences
Password references. -
origin
Origin of this password.
-
-
Constructor Details
-
PasswordData
Creates a new password data. The origin of this data isOrigin.Userby default.- Parameters:
password- password
-
PasswordData
Creates a new password data. The origin of this data isOrigin.Userby default.- Parameters:
password- password
-
PasswordData
Creates a new password data. The origin of this data isOrigin.Userby default.- Parameters:
username- usernamepassword- password
-
PasswordData
Creates a new password data. The origin of this data isOrigin.Userby default.- Parameters:
username- usernamepassword- password
-
PasswordData
Creates a new password data.- Parameters:
password- passwordorigin- origin
-
PasswordData
Creates a new password data.- Parameters:
password- passwordorigin- origin
-
PasswordData
Creates a new password data.- Parameters:
username- usernamepassword- passwordorigin- origin
-
PasswordData
Creates a new password data.- Parameters:
username- usernamepassword- passwordorigin- origin
-
PasswordData
Creates a new password data.- Parameters:
username- usernamepassword- passwordreferences- references
-
PasswordData
Creates a new password data.- Parameters:
username- usernamepassword- passwordreferences- references
-
PasswordData
Creates a new password data.- Parameters:
username- usernamepassword- passwordreferences- references
-
PasswordData
Creates a new password data.- Parameters:
username- usernamepassword- passwordreferences- references
-
PasswordData
public PasswordData(CharSequence username, CharSequence password, Origin origin, Reference... references) Creates a new password data.- Parameters:
username- usernamepassword- passwordorigin- originreferences- references
-
PasswordData
public PasswordData(UnicodeString username, UnicodeString password, Origin origin, Reference... references) Creates a new password data.- Parameters:
username- usernamepassword- passwordorigin- originreferences- references
-
PasswordData
public PasswordData(CharSequence username, CharSequence password, Origin origin, List<Reference> references) Creates a new password data.- Parameters:
username- usernamepassword- passwordorigin- originreferences- references
-
PasswordData
public PasswordData(UnicodeString username, UnicodeString password, Origin origin, List<Reference> references) Creates a new password data.- Parameters:
username- usernamepassword- passwordorigin- originreferences- references
-
-
Method Details
-
getPassword
Returns the password.- Returns:
- password
-
getOrigin
Returns the origin.- Returns:
- origin
-
getUsername
Returns the username.- Returns:
- username
-
getPasswordReferences
Returns the password references.- Returns:
- password references
-
getPasswordReferences
Returns the password references that match the supplied reference type.- Type Parameters:
T- type of password reference- Parameters:
type- of reference to match- Returns:
- unmodifiable list of password references
-
clear
public void clear()Clears the memory of the underlying objects in this password data. SeeUnicodeString.clear(). -
copy
Returns a new password data initialized with the supplied data.- Parameters:
data- password data to read properties from- Returns:
- new password data
-
toString
-