@NotExtensible @Mutable @ThreadSafety(level=NOT_THREADSAFE) public class InMemoryDirectoryServerConfig extends java.lang.Object
InMemoryDirectoryServer
instance.
At least one base DN must be specified. For all other properties, the
following default values will be used unless an alternate configuration is
provided:
Constructor and Description |
---|
InMemoryDirectoryServerConfig(DN... baseDNs)
Creates a new in-memory directory server config object with the default
settings.
|
InMemoryDirectoryServerConfig(InMemoryDirectoryServerConfig cfg)
Creates a new in-memory directory server config object that is a duplicate
of the provided config and may be altered without impacting the state of
the given config object.
|
InMemoryDirectoryServerConfig(java.lang.String... baseDNs)
Creates a new in-memory directory server config object with the provided
set of base DNs.
|
Modifier and Type | Method and Description |
---|---|
void |
addAdditionalBindCredentials(java.lang.String dn,
byte[] password)
Adds an additional bind DN and password combination that can be used to
bind to the server, even if the corresponding entry does not exist in the
data set.
|
void |
addAdditionalBindCredentials(java.lang.String dn,
java.lang.String password)
Adds an additional bind DN and password combination that can be used to
bind to the server, even if the corresponding entry does not exist in the
data set.
|
void |
addExtendedOperationHandler(InMemoryExtendedOperationHandler handler)
Adds the provided extended operation handler for use by the server for
processing certain types of extended operations.
|
void |
addInMemoryOperationInterceptor(InMemoryOperationInterceptor interceptor)
Adds the provided operation interceptor to the list of operation
interceptors that may be used to transform requests before they are
processed by the in-memory directory server, and/or to transform responses
before they are returned to the client.
|
void |
addSASLBindHandler(InMemorySASLBindHandler handler)
Adds the provided SASL bind handler for use by the server for processing
certain types of SASL bind requests.
|
boolean |
enforceAttributeSyntaxCompliance()
Indicates whether the server should reject attribute values which violate
the constraints of the associated syntax.
|
boolean |
enforceSingleStructuralObjectClass()
Indicates whether the server should reject entries which do not contain
exactly one structural object class.
|
boolean |
generateOperationalAttributes()
Indicates whether the server should automatically generate operational
attributes (including entryDN, entryUUID, creatorsName, createTimestamp,
modifiersName, modifyTimestamp, and subschemaSubentry) for entries in the
server.
|
java.util.logging.Handler |
getAccessLogHandler()
Retrieves the log handler that should be used to record access log messages
about operations processed by the server, if any.
|
java.util.Map<DN,byte[]> |
getAdditionalBindCredentials()
Retrieves a map containing DNs and passwords of additional users that will
be allowed to bind to the server, even if their entries do not exist in the
data set.
|
java.util.Set<OperationType> |
getAllowedOperationTypes()
Retrieves the set of operation types that will be allowed by the server.
|
java.util.Set<OperationType> |
getAuthenticationRequiredOperationTypes()
Retrieves the set of operation types that will only be allowed for
authenticated clients.
|
DN[] |
getBaseDNs()
Retrieves the set of base DNs that should be used for the directory server.
|
java.lang.String |
getCodeLogPath()
Retrieves the path to a file to be written with generated code that may
be used to construct the requests processed by the server.
|
java.util.List<Attribute> |
getCustomRootDSEAttributes()
Retrieves a list of custom attributes that should be included in the root
DSE that is dynamically generated by the in-memory directory server.
|
java.util.List<java.lang.String> |
getEqualityIndexAttributes()
Retrieves a list containing the names or OIDs of the attribute types for
which to maintain an equality index to improve the performance of certain
kinds of searches.
|
java.util.List<InMemoryExtendedOperationHandler> |
getExtendedOperationHandlers()
Retrieves a list of the extended operation handlers that may be used to
process extended operations in the server.
|
java.util.logging.Handler |
getJSONAccessLogHandler()
Retrieves the log handler that should be used to record JSON-formatted
access log messages about operations processed by the server, if any.
|
java.util.logging.Handler |
getLDAPDebugLogHandler()
Retrieves the log handler that should be used to record detailed messages
about LDAP communication to and from the server, which may be useful for
debugging purposes.
|
java.util.List<InMemoryListenerConfig> |
getListenerConfigs()
Retrieves the list of listener configurations that should be used for the
directory server.
|
LDAPListenerExceptionHandler |
getListenerExceptionHandler()
Retrieves the object that should be used to handle any errors encountered
while attempting to interact with a client, if defined.
|
int |
getMaxChangeLogEntries()
Retrieves the maximum number of changelog entries that the server should
maintain.
|
int |
getMaxConnections()
Retrieves the maximum number of concurrent connections that the server will
allow.
|
int |
getMaxMessageSizeBytes()
Retrieves the maximum size in bytes for LDAP messages that will be accepted
by the server.
|
int |
getMaxSizeLimit()
Retrieves the maximum number of entries that the server should return in
any search operation.
|
java.util.List<InMemoryOperationInterceptor> |
getOperationInterceptors()
Retrieves a list of the operation interceptors that may be used to
intercept and transform requests before they are processed by the in-memory
directory server, and/or to intercept and transform responses before they
are returned to the client.
|
java.util.Set<java.lang.String> |
getPasswordAttributes()
Retrieves an unmodifiable set containing the names or OIDs of the
attributes that may hold passwords.
|
InMemoryPasswordEncoder |
getPrimaryPasswordEncoder()
Retrieves the primary password encoder for the in-memory directory server,
if any.
|
java.util.Set<java.lang.String> |
getReferentialIntegrityAttributes()
Retrieves the names of the attributes for which referential integrity
should be maintained.
|
ReadOnlyEntry |
getRootDSEEntry()
Retrieves a predefined entry that should always be returned as the
in-memory directory server's root DSE, if defined.
|
java.util.List<InMemorySASLBindHandler> |
getSASLBindHandlers()
Retrieves a list of the SASL bind handlers that may be used to process
SASL bind requests in the server.
|
Schema |
getSchema()
Retrieves the schema that should be used by the server, if defined.
|
java.util.List<InMemoryPasswordEncoder> |
getSecondaryPasswordEncoders()
Retrieves an unmodifiable map of the secondary password encoders for the
in-memory directory server, indexed by prefix.
|
java.lang.String |
getVendorName()
Retrieves the vendor name value to report in the server root DSE.
|
java.lang.String |
getVendorVersion()
Retrieves the vendor version value to report in the server root DSE.
|
boolean |
includeRequestProcessingInCodeLog()
Indicates whether the code log should include sample code for processing
the generated requests.
|
void |
setAccessLogHandler(java.util.logging.Handler accessLogHandler)
Specifies the log handler that should be used to record access log messages
about operations processed by the server.
|
void |
setAllowedOperationTypes(java.util.Collection<OperationType> operationTypes)
Specifies the set of operation types that will be allowed by the server.
|
void |
setAllowedOperationTypes(OperationType... operationTypes)
Specifies the set of operation types that will be allowed by the server.
|
void |
setAuthenticationRequiredOperationTypes(java.util.Collection<OperationType> operationTypes)
Specifies the set of operation types that will only be allowed for
authenticated clients.
|
void |
setAuthenticationRequiredOperationTypes(OperationType... operationTypes)
Specifies the set of operation types that will only be allowed for
authenticated clients.
|
void |
setBaseDNs(DN... baseDNs)
Specifies the set of base DNs that should be used for the directory server.
|
void |
setBaseDNs(java.lang.String... baseDNs)
Specifies the set of base DNs that should be used for the directory server.
|
void |
setCodeLogDetails(java.lang.String codeLogPath,
boolean includeProcessing)
Specifies information about code logging that should be performed by the
server, if any.
|
void |
setCustomRootDSEAttributes(java.util.List<Attribute> customRootDSEAttributes)
Specifies a list of custom attributes that should be included in the root
DSE that is dynamically generated by the in-memory directory server.
|
void |
setEnforceAttributeSyntaxCompliance(boolean enforceAttributeSyntaxCompliance)
Specifies whether the server should reject attribute values which violate
the constraints of the associated syntax.
|
void |
setEnforceSingleStructuralObjectClass(boolean enforceSingleStructuralObjectClass)
Specifies whether the server should reject entries which do not contain
exactly one structural object class.
|
void |
setEqualityIndexAttributes(java.util.Collection<java.lang.String> equalityIndexAttributes)
Specifies the names or OIDs of the attribute types for which to maintain an
equality index to improve the performance of certain kinds of searches.
|
void |
setEqualityIndexAttributes(java.lang.String... equalityIndexAttributes)
Specifies the names or OIDs of the attribute types for which to maintain an
equality index to improve the performance of certain kinds of searches.
|
void |
setGenerateOperationalAttributes(boolean generateOperationalAttributes)
Specifies whether the server should automatically generate operational
attributes (including entryDN, entryUUID, creatorsName, createTimestamp,
modifiersName, modifyTimestamp, and subschemaSubentry) for entries in the
server.
|
void |
setJSONAccessLogHandler(java.util.logging.Handler jsonAccessLogHandler)
Specifies the log handler that should be used to record JSON-formatted
access log messages about operations processed by the server.
|
void |
setLDAPDebugLogHandler(java.util.logging.Handler ldapDebugLogHandler)
Specifies the log handler that should be used to record detailed messages
about LDAP communication to and from the server, which may be useful for
debugging purposes.
|
void |
setListenerConfigs(java.util.Collection<InMemoryListenerConfig> listenerConfigs)
Specifies the configurations for all listeners that should be used for the
directory server.
|
void |
setListenerConfigs(InMemoryListenerConfig... listenerConfigs)
Specifies the configurations for all listeners that should be used for the
directory server.
|
void |
setListenerExceptionHandler(LDAPListenerExceptionHandler exceptionHandler)
Specifies the LDAP listener exception handler that the server should use to
handle any errors encountered while attempting to interact with a client.
|
void |
setMaxChangeLogEntries(int maxChangeLogEntries)
Specifies the maximum number of changelog entries that the server should
maintain.
|
void |
setMaxConnections(int maxConnections)
Specifies the maximum number of concurrent connections that the server will
allow.
|
void |
setMaxMessageSizeBytes(int maxMessageSizeBytes)
Specifies the maximum size in bytes for LDAP messages that will be accepted
by the server.
|
void |
setMaxSizeLimit(int maxSizeLimit)
Specifies the maximum number of entries that the server should return in
any search operation.
|
void |
setPasswordAttributes(java.util.Collection<java.lang.String> passwordAttributes)
Specifies the names or OIDs of the attributes that may hold passwords.
|
void |
setPasswordAttributes(java.lang.String... passwordAttributes)
Specifies the names or OIDs of the attributes that may hold passwords.
|
void |
setPasswordEncoders(InMemoryPasswordEncoder primaryEncoder,
java.util.Collection<InMemoryPasswordEncoder> secondaryEncoders)
Specifies the set of password encoders to use for the in-memory directory
server.
|
void |
setPasswordEncoders(InMemoryPasswordEncoder primaryEncoder,
InMemoryPasswordEncoder... secondaryEncoders)
Specifies the set of password encoders to use for the in-memory directory
server.
|
void |
setReferentialIntegrityAttributes(java.util.Collection<java.lang.String> referentialIntegrityAttributes)
Specifies the names of the attributes for which referential integrity
should be maintained.
|
void |
setReferentialIntegrityAttributes(java.lang.String... referentialIntegrityAttributes)
Specifies the names of the attributes for which referential integrity
should be maintained.
|
void |
setRootDSEEntry(Entry rootDSEEntry)
Specifies an entry that should always be returned as the in-memory
directory server's root DSE.
|
void |
setSchema(Schema schema)
Specifies the schema that should be used by the server.
|
void |
setVendorName(java.lang.String vendorName)
Specifies the vendor name value to report in the server root DSE.
|
void |
setVendorVersion(java.lang.String vendorVersion)
Specifies the vendor version value to report in the server root DSE.
|
java.lang.String |
toString()
Retrieves a string representation of this in-memory directory server
configuration.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this in-memory directory server
configuration to the provided buffer.
|
public InMemoryDirectoryServerConfig(@NotNull java.lang.String... baseDNs) throws LDAPException
baseDNs
- The set of base DNs to use for the server. It must not
be null
or empty.LDAPException
- If the provided set of base DN strings is null or
empty, or if any of the provided base DN strings
cannot be parsed as a valid DN.public InMemoryDirectoryServerConfig(@NotNull DN... baseDNs) throws LDAPException
baseDNs
- The set of base DNs to use for the server. It must not
be null
or empty.LDAPException
- If the provided set of base DNs is null or empty.public InMemoryDirectoryServerConfig(@NotNull InMemoryDirectoryServerConfig cfg)
cfg
- The in-memory directory server config object for to be
duplicated.@NotNull public DN[] getBaseDNs()
public void setBaseDNs(@NotNull java.lang.String... baseDNs) throws LDAPException
baseDNs
- The set of base DNs that should be used for the directory
server. It must not be null
or empty.LDAPException
- If the provided set of base DN strings is null or
empty, or if any of the provided base DN strings
cannot be parsed as a valid DN.public void setBaseDNs(@NotNull DN... baseDNs) throws LDAPException
baseDNs
- The set of base DNs that should be used for the directory
server. It must not be null
or empty.LDAPException
- If the provided set of base DNs is null or empty.@NotNull public java.util.List<InMemoryListenerConfig> getListenerConfigs()
public void setListenerConfigs(@NotNull InMemoryListenerConfig... listenerConfigs) throws LDAPException
listenerConfigs
- The configurations for all listeners that should
be used for the directory server. It must not be
null
or empty, and it must not contain
multiple configurations with the same name.LDAPException
- If there is a problem with the provided set of
listener configurations.public void setListenerConfigs(@NotNull java.util.Collection<InMemoryListenerConfig> listenerConfigs) throws LDAPException
listenerConfigs
- The configurations for all listeners that should
be used for the directory server. It must not be
null
or empty, and it must not contain
multiple configurations with the same name.LDAPException
- If there is a problem with the provided set of
listener configurations.@NotNull public java.util.Set<OperationType> getAllowedOperationTypes()
public void setAllowedOperationTypes(@Nullable OperationType... operationTypes)
operationTypes
- The set of operation types that will be allowed by
the server.public void setAllowedOperationTypes(@Nullable java.util.Collection<OperationType> operationTypes)
operationTypes
- The set of operation types that will be allowed by
the server.@NotNull public java.util.Set<OperationType> getAuthenticationRequiredOperationTypes()
public void setAuthenticationRequiredOperationTypes(@Nullable OperationType... operationTypes)
operationTypes
- The set of operation types that will be allowed for
authenticated clients.public void setAuthenticationRequiredOperationTypes(@Nullable java.util.Collection<OperationType> operationTypes)
operationTypes
- The set of operation types that will be allowed for
authenticated clients.@NotNull public java.util.Map<DN,byte[]> getAdditionalBindCredentials()
public void addAdditionalBindCredentials(@NotNull java.lang.String dn, @NotNull java.lang.String password) throws LDAPException
dn
- The bind DN to allow. It must not be null
or
represent the null DN.password
- The password for the provided bind DN. It must not be
null
or empty.LDAPException
- If there is a problem with the provided bind DN or
password.public void addAdditionalBindCredentials(@NotNull java.lang.String dn, @NotNull byte[] password) throws LDAPException
dn
- The bind DN to allow. It must not be null
or
represent the null DN.password
- The password for the provided bind DN. It must not be
null
or empty.LDAPException
- If there is a problem with the provided bind DN or
password.@Nullable public LDAPListenerExceptionHandler getListenerExceptionHandler()
null
if no
exception handler should be used.public void setListenerExceptionHandler(@Nullable LDAPListenerExceptionHandler exceptionHandler)
exceptionHandler
- The LDAP listener exception handler that the
server should use to handle any errors
encountered while attempting to interact with a
client. It may be null
if no exception
handler should be used.@Nullable public Schema getSchema()
null
if
no schema should be used.public void setSchema(@Nullable Schema schema)
schema
- The schema that should be used by the server. It may be
null
if no schema should be used.public boolean enforceAttributeSyntaxCompliance()
null
schema is in place.true
if the server should reject attribute values which
violate the constraints of the associated syntax, or false
if not.public void setEnforceAttributeSyntaxCompliance(boolean enforceAttributeSyntaxCompliance)
null
schema is in place.enforceAttributeSyntaxCompliance
- Indicates whether the server
should reject attribute values
which violate the constraints of
the associated syntax.public boolean enforceSingleStructuralObjectClass()
null
schema is in place.true
if the server should reject entries which do not
contain exactly one structural object class, or false
if
it should allow entries which do not have any structural class or
that have multiple structural classes.public void setEnforceSingleStructuralObjectClass(boolean enforceSingleStructuralObjectClass)
null
schema is in place.enforceSingleStructuralObjectClass
- Indicates whether the server
should reject entries which do
not contain exactly one
structural object class.@Nullable public java.util.logging.Handler getAccessLogHandler()
null
if no
access logging should be performed.public void setAccessLogHandler(@Nullable java.util.logging.Handler accessLogHandler)
accessLogHandler
- The log handler that should be used to record
access log messages about operations processed by
the server. It may be null
if no access
logging should be performed.@Nullable public java.util.logging.Handler getJSONAccessLogHandler()
null
if no access logging should be performed.public void setJSONAccessLogHandler(@Nullable java.util.logging.Handler jsonAccessLogHandler)
jsonAccessLogHandler
- The log handler that should be used to record
JSON-formatted access log messages about
operations processed by the server. It may
be null
if no access logging should
be performed.@Nullable public java.util.logging.Handler getLDAPDebugLogHandler()
null
if no debug logging should be
performed.public void setLDAPDebugLogHandler(@Nullable java.util.logging.Handler ldapDebugLogHandler)
ldapDebugLogHandler
- The log handler that should be used to record
detailed messages about LDAP communication to
and from the server. It may be null
if no LDAP debug logging should be performed.@Nullable public java.lang.String getCodeLogPath()
null
if no code log should be written.public boolean includeRequestProcessingInCodeLog()
getCodeLogPath()
returns a non-null
value.false
if the code log should only include code that
corresponds to requests received from clients, or true
if
the code log should also include sample code for processing the
generated requests and interpreting the results.public void setCodeLogDetails(@Nullable java.lang.String codeLogPath, boolean includeProcessing)
codeLogPath
- The path to the file to which a code log should
be written. It may be null
if no code
log should be written.includeProcessing
- Indicates whether to include sample code that
demonstrates how to process the requests and
interpret the results. This will only be
used if the codeLogPath
argument is
non-null
.@NotNull public java.util.List<InMemoryOperationInterceptor> getOperationInterceptors()
public void addInMemoryOperationInterceptor(@NotNull InMemoryOperationInterceptor interceptor)
interceptor
- The operation interceptor that should be invoked in
the course of processing requests and responses.@NotNull public java.util.List<InMemoryExtendedOperationHandler> getExtendedOperationHandlers()
public void addExtendedOperationHandler(@NotNull InMemoryExtendedOperationHandler handler)
handler
- The extended operation handler that should be used by the
server for processing certain types of extended
operations.@NotNull public java.util.List<InMemorySASLBindHandler> getSASLBindHandlers()
public void addSASLBindHandler(@NotNull InMemorySASLBindHandler handler)
handler
- The SASL bind handler that should be used by the server
for processing certain types of SASL bind requests.public boolean generateOperationalAttributes()
true
if the server should automatically generate
operational attributes for entries in the server, or false
if not.public void setGenerateOperationalAttributes(boolean generateOperationalAttributes)
generateOperationalAttributes
- Indicates whether the server should
automatically generate operational
attributes for entries in the
server.public int getMaxChangeLogEntries()
public void setMaxChangeLogEntries(int maxChangeLogEntries)
maxChangeLogEntries
- The maximum number of changelog entries that
the server should maintain.public int getMaxConnections()
public void setMaxConnections(int maxConnections)
maxConnections
- The maximum number of concurrent connections that
the server will allow. A value that is less than
or equal to zero indicates no limit.public int getMaxMessageSizeBytes()
public void setMaxMessageSizeBytes(int maxMessageSizeBytes)
maxMessageSizeBytes
- The maximum size in bytes for LDAP messages
that will be accepted by the server. A
value that is less than or equal to zero will
use the maximum allowed message size.public int getMaxSizeLimit()
public void setMaxSizeLimit(int maxSizeLimit)
maxSizeLimit
- The maximum number of entries that the server should
return in any search operation.@NotNull public java.util.List<java.lang.String> getEqualityIndexAttributes()
public void setEqualityIndexAttributes(@Nullable java.lang.String... equalityIndexAttributes)
equalityIndexAttributes
- The names or OIDs of the attributes for
which to maintain an equality index to
improve the performance of certain kinds
of searches. It may be null
or
empty to indicate that no equality indexes
should be maintained.public void setEqualityIndexAttributes(@Nullable java.util.Collection<java.lang.String> equalityIndexAttributes)
equalityIndexAttributes
- The names or OIDs of the attributes for
which to maintain an equality index to
improve the performance of certain kinds
of searches. It may be null
or
empty to indicate that no equality indexes
should be maintained.@NotNull public java.util.Set<java.lang.String> getReferentialIntegrityAttributes()
public void setReferentialIntegrityAttributes(@Nullable java.lang.String... referentialIntegrityAttributes)
referentialIntegrityAttributes
- The names of the attributes for
which referential integrity should
be maintained. The values of
these attributes should be DNs.
It may be null
or empty if
referential integrity should not
be maintained.public void setReferentialIntegrityAttributes(@Nullable java.util.Collection<java.lang.String> referentialIntegrityAttributes)
referentialIntegrityAttributes
- The names of the attributes for
which referential integrity should
be maintained. The values of
these attributes should be DNs.
It may be null
or empty if
referential integrity should not
be maintained.@Nullable public java.lang.String getVendorName()
null
if no vendor name should appear.public void setVendorName(@Nullable java.lang.String vendorName)
vendorName
- The vendor name value to report in the server root DSE.
It may be null
if no vendor name should appear.@Nullable public java.lang.String getVendorVersion()
null
if no vendor version should appear.public void setVendorVersion(@Nullable java.lang.String vendorVersion)
vendorVersion
- The vendor version value to report in the server
root DSE. It may be null
if no vendor
version should appear.@Nullable public ReadOnlyEntry getRootDSEEntry()
null
if the root DSE
should be dynamically generated.public void setRootDSEEntry(@Nullable Entry rootDSEEntry)
setCustomRootDSEAttributes(java.util.List<com.unboundid.ldap.sdk.Attribute>)
method may be used to specify custom
attributes that should be included in the root DSE entry while still having
the server generate dynamic values for other attributes. If both a root
DSE entry and a custom set of root DSE attributes are specified, then the
root DSE entry will take precedence.rootDSEEntry
- An entry that should always be returned as the
in-memory directory server's root DSE, or
null
to indicate that the root DSE should be
dynamically generated.@NotNull public java.util.List<Attribute> getCustomRootDSEAttributes()
public void setCustomRootDSEAttributes(@Nullable java.util.List<Attribute> customRootDSEAttributes)
setRootDSEEntry(com.unboundid.ldap.sdk.Entry)
method is used to override the entire entry. Also
note that any attributes provided in this list will override those that
would be dynamically generated by the in-memory directory server.customRootDSEAttributes
- A list of custom attributes that should
be included in the root DSE that is
dynamically generated by the in-memory
directory server. It may be null
or empty if no custom attributes should be
included in the root DSE.@NotNull public java.util.Set<java.lang.String> getPasswordAttributes()
InMemoryPasswordEncoder
.public void setPasswordAttributes(@Nullable java.lang.String... passwordAttributes)
InMemoryPasswordEncoder
.passwordAttributes
- The names or OIDs of the attributes that may
hold passwords. It may be null
or
empty if there should not be any password
attributes, but that will prevent user
authentication from succeeding.public void setPasswordAttributes(@Nullable java.util.Collection<java.lang.String> passwordAttributes)
InMemoryPasswordEncoder
.passwordAttributes
- The names or OIDs of the attributes that may
hold passwords. It may be null
or
empty if there should not be any password
attributes, but that will prevent user
authentication from succeeding.@Nullable public InMemoryPasswordEncoder getPrimaryPasswordEncoder()
null
if clear-text passwords should be left in the
clear without any encoding.@NotNull public java.util.List<InMemoryPasswordEncoder> getSecondaryPasswordEncoders()
public void setPasswordEncoders(@Nullable InMemoryPasswordEncoder primaryEncoder, @Nullable InMemoryPasswordEncoder... secondaryEncoders) throws LDAPException
primaryEncoder
- The primary password encoder to use for the
in-memory directory server. This encoder will
be used to encode any new clear-text passwords
that are provided to the server in add or modify
operations or in LDIF imports. It will also be
used to interact with pre-encoded passwords
for any encoded passwords that start with the
same prefix as this password encoder. It may be
null
if no password encoder is desired
and clear-text passwords should remain in the
clear.secondaryEncoders
- The secondary password encoders to use when
interacting with pre-encoded passwords, but that
will not be used to encode new clear-text
passwords. This may be null
or empty if
no secondary password encoders are needed.LDAPException
- If there is a conflict between the prefixes used by
two or more of the provided encoders.public void setPasswordEncoders(@Nullable InMemoryPasswordEncoder primaryEncoder, @Nullable java.util.Collection<InMemoryPasswordEncoder> secondaryEncoders) throws LDAPException
primaryEncoder
- The primary password encoder to use for the
in-memory directory server. This encoder will
be used to encode any new clear-text passwords
that are provided to the server in add or modify
operations or in LDIF imports. It will also be
used to interact with pre-encoded passwords
for any encoded passwords that start with the
same prefix as this password encoder. It may be
null
if no password encoder is desired
and clear-text passwords should remain in the
clear.secondaryEncoders
- The secondary password encoders to use when
interacting with pre-encoded passwords, but that
will not be used to encode new clear-text
passwords. This may be null
or empty if
no secondary password encoders are needed.LDAPException
- If there is a conflict between the prefixes used by
two or more of the provided encoders.@NotNull public java.lang.String toString()
toString
in class java.lang.Object