Package com.unboundid.ldap.sdk
Class SASLClientBindHandler
- java.lang.Object
-
- com.unboundid.ldap.sdk.SASLClientBindHandler
-
@ThreadSafety(level=COMPLETELY_THREADSAFE) public final class SASLClientBindHandler extends java.lang.Object
This class provides a mechanism for performing a SASL bind operation (or set of operations) using a JavaSaslClient
to perform all of the SASL-related processing. This also supports enabling communication security for SASL mechanisms that support theauth-int
orauth-conf
quality of protection mechanisms.
-
-
Constructor Summary
Constructors Constructor Description SASLClientBindHandler(SASLBindRequest bindRequest, LDAPConnection connection, java.lang.String mechanism, javax.security.sasl.SaslClient saslClient, Control[] controls, long responseTimeoutMillis, java.util.List<java.lang.String> unhandledCallbackMessages)
Creates a new SASL client with the provided information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getMessageID()
Retrieves the message ID for the last message in the exchange with the directory server.BindResult
processSASLBind()
Performs a SASL bind against an LDAP directory server.
-
-
-
Constructor Detail
-
SASLClientBindHandler
public SASLClientBindHandler(@NotNull SASLBindRequest bindRequest, @NotNull LDAPConnection connection, @NotNull java.lang.String mechanism, @NotNull javax.security.sasl.SaslClient saslClient, @Nullable Control[] controls, long responseTimeoutMillis, @NotNull java.util.List<java.lang.String> unhandledCallbackMessages)
Creates a new SASL client with the provided information.- Parameters:
bindRequest
- The SASL bind request being processed. This must not benull
.connection
- The connection to use to communicate with the directory server. This must not benull
.mechanism
- The name of the SASL mechanism to use. This must not benull
or empty.saslClient
- The Java SASL client instance to use to perform the processing. This must not benull
.controls
- The set of controls to include in the request. This may benull
or empty if no controls should be included in the request.responseTimeoutMillis
- The maximum length of time in milliseconds to wait for a response from the server. A value that is less than or equal to zero indicates that no timeout should be enforced.unhandledCallbackMessages
- A list that will be updated with messages about any unhandled callbacks. This list must be managed by the bind request class, which should update it if itsCallbackHandler.handle
method is invoked with one or more callbacks that it does not handle or support. It must not benull
.
-
-
Method Detail
-
processSASLBind
@NotNull public BindResult processSASLBind() throws LDAPException
Performs a SASL bind against an LDAP directory server.- Returns:
- The result of the bind operation processing.
- Throws:
LDAPException
- If a problem occurs while processing the bind.
-
getMessageID
public int getMessageID()
Retrieves the message ID for the last message in the exchange with the directory server.- Returns:
- The message for the last message in the exchange with the directory server.
-
-