@ThreadSafety(level=COMPLETELY_THREADSAFE) public final class InMemoryDirectoryServerPassword extends java.lang.Object
InMemoryPasswordEncoder
.Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttributeName()
Retrieves the name of the attribute with which the stored password is
associated.
|
ASN1OctetString |
getClearPassword()
Retrieves the clear-text representation of the stored password, if it
is possible to obtain it.
|
InMemoryPasswordEncoder |
getPasswordEncoder()
Retrieves the password encoder that should be used to interact with the
stored password.
|
ASN1OctetString |
getStoredPassword()
Retrieves the password as it is (or has the potential to be) stored in the
in-memory directory server.
|
boolean |
isEncoded()
Indicates whether the stored password is encoded or in the clear.
|
boolean |
matchesClearPassword(ASN1OctetString clearPassword)
Indicates whether this password matches the provided clear-text password.
|
public ASN1OctetString getStoredPassword()
isEncoded()
method returns
true
, then the stored password will be treated as an encoded
password. Otherwise, it will be treated as a clear-text password with
no encoding or output formatting.public java.lang.String getAttributeName()
public boolean isEncoded()
true
if the stored password is encoded, or false
if it is the clear.public InMemoryPasswordEncoder getPasswordEncoder()
null
if the password is not encoded.public ASN1OctetString getClearPassword() throws LDAPException
InMemoryPasswordEncoder.extractClearPasswordFromEncodedPassword(com.unboundid.asn1.ASN1OctetString, com.unboundid.ldap.sdk.ReadOnlyEntry)
method will be used in an attempt toLDAPException
- If the stored password is encoded using a mechanism
that does not permit extracting the clear-text
password.public boolean matchesClearPassword(ASN1OctetString clearPassword) throws LDAPException
clearPassword
- The clear-text password for which to make the
determination.true
if this password matches the provided clear-text
password, or false
if not.LDAPException
- If a problem is encountered while trying to make
the determination.