Package org.opends.server.core
Interface PasswordVerifier
-
public interface PasswordVerifier
Verifies password against user / authenticationPasswordStorageScheme
s.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static boolean
authPasswordMatches(ByteSequence plaintextPassword, String encodedPassword)
Indicates whether the provided plaintext password matches the encoded password using the authentication password syntax.static boolean
authPasswordMatches(PasswordStorageScheme<?> scheme, ByteSequence plaintextPassword, AuthPassword password)
Indicates whether the provided plaintext password matches the encoded password using the authentication password syntax.static PasswordVerifier
getPasswordVerifier(boolean isAuthPasswordSyntax)
Returns the user or authentication password verifier.boolean
passwordMatches(ByteSequence plaintextPassword, String encodedPassword)
Indicates whether the provided plaintext password matches the encoded password.static boolean
userPasswordMatches(ByteSequence plaintextPassword, String encodedPassword)
Indicates whether the provided plaintext password matches the encoded password using the user password syntax.static boolean
userPasswordMatches(PasswordStorageScheme<?> scheme, ByteSequence plaintextPassword, UserPassword password)
Indicates whether the provided plaintext password matches the encoded password using the user password syntax.
-
-
-
Method Detail
-
getPasswordVerifier
static PasswordVerifier getPasswordVerifier(boolean isAuthPasswordSyntax)
Returns the user or authentication password verifier.- Parameters:
isAuthPasswordSyntax
- iftrue
, returns the authentication password verifier, iffalse
, returns the user password verifier.- Returns:
- the user or authentication password verifier
-
passwordMatches
boolean passwordMatches(ByteSequence plaintextPassword, String encodedPassword) throws DecodeException
Indicates whether the provided plaintext password matches the encoded password.- Parameters:
plaintextPassword
- The plaintext password provided by the user.encodedPassword
- The encoded password to verify against.- Returns:
true
if the provided plaintext password matches the encoded password,false
otherwise- Throws:
DecodeException
- when the encoded password cannot be decoded
-
userPasswordMatches
static boolean userPasswordMatches(ByteSequence plaintextPassword, String encodedPassword) throws DecodeException
Indicates whether the provided plaintext password matches the encoded password using the user password syntax.- Parameters:
plaintextPassword
- The plaintext password provided by the user.encodedPassword
- The encoded password to verify against.- Returns:
true
if the provided plaintext password matches the encoded password, orfalse
if it does not or this storage scheme does not support the user password syntax.- Throws:
DecodeException
- when the encoded password cannot be decoded
-
userPasswordMatches
static boolean userPasswordMatches(PasswordStorageScheme<?> scheme, ByteSequence plaintextPassword, UserPassword password)
Indicates whether the provided plaintext password matches the encoded password using the user password syntax.- Parameters:
scheme
- The password storage schemeplaintextPassword
- The plaintext password provided by the user.password
- The user password to verify.- Returns:
true
if the provided plaintext password matches the encoded password, orfalse
if it does not or this storage scheme does not support the authentication password syntax.
-
authPasswordMatches
static boolean authPasswordMatches(ByteSequence plaintextPassword, String encodedPassword) throws DecodeException
Indicates whether the provided plaintext password matches the encoded password using the authentication password syntax.- Parameters:
plaintextPassword
- The plaintext password provided by the user.encodedPassword
- The encoded password to verify.- Returns:
true
if the provided plaintext password matches the encoded password, orfalse
if it does not or this storage scheme does not support the authentication password syntax.- Throws:
DecodeException
- when the encoded password cannot be decoded
-
authPasswordMatches
static boolean authPasswordMatches(PasswordStorageScheme<?> scheme, ByteSequence plaintextPassword, AuthPassword password)
Indicates whether the provided plaintext password matches the encoded password using the authentication password syntax.- Parameters:
scheme
- The password storage schemeplaintextPassword
- The plaintext password provided by the user.password
- The authentication password to verify.- Returns:
true
if the provided plaintext password matches the encoded password, orfalse
if it does not or this storage scheme does not support the authentication password syntax.
-
-