@ThreadSafety(level=NOT_THREADSAFE) public final class SCRAMSHA1BindRequest extends SCRAMBindRequest
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SCRAM_SHA_1_MECHANISM_NAME
The name for the SCRAM-SHA-1 SASL mechanism.
|
CRED_TYPE_SASL
VERSION_ELEMENT
Constructor and Description |
---|
SCRAMSHA1BindRequest(java.lang.String username,
byte[] password,
Control... controls)
Creates a new SCRAM-SHA-1 bind request with the provided information.
|
SCRAMSHA1BindRequest(java.lang.String username,
java.lang.String password,
Control... controls)
Creates a new SCRAM-SHA-1 bind request with the provided information.
|
Modifier and Type | Method and Description |
---|---|
SCRAMSHA1BindRequest |
duplicate()
Creates a new instance of this LDAP request that may be modified without
impacting this request.
|
SCRAMSHA1BindRequest |
duplicate(Control[] controls)
Creates a new instance of this LDAP request that may be modified without
impacting this request.
|
protected java.lang.String |
getDigestAlgorithmName()
Retrieves the name of the digest algorithm that will be used in the
authentication processing.
|
protected java.lang.String |
getMACAlgorithmName()
Retrieves the name of the MAC algorithm that will be used in the
authentication processing.
|
SCRAMSHA1BindRequest |
getRebindRequest(java.lang.String host,
int port)
Retrieves a bind request that may be used to re-bind using the same
credentials authentication type and credentials as previously used to
perform the initial bind.
|
java.lang.String |
getSASLMechanismName()
Retrieves the name of the SASL mechanism used in this SASL bind request.
|
void |
toCode(java.util.List<java.lang.String> lineList,
java.lang.String requestID,
int indentSpaces,
boolean includeProcessing)
Appends a number of lines comprising the Java source code that can be used
to recreate this request to the given list.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this request to the provided buffer.
|
getPasswordBytes, getPasswordString, getUsername, process
getBindType, getLastMessageID, responseReceived, sendBindRequest, sendMessage
getOperationType
followReferrals, getControl, getControlList, getControls, getIntermediateResponseListener, getReferralConnector, getReferralConnectorInternal, getReferralDepth, getResponseTimeoutMillis, hasControl, hasControl, setFollowReferrals, setIntermediateResponseListener, setReferralConnector, setReferralDepth, setResponseTimeoutMillis, toString
@NotNull public static final java.lang.String SCRAM_SHA_1_MECHANISM_NAME
public SCRAMSHA1BindRequest(@NotNull java.lang.String username, @NotNull java.lang.String password, @Nullable Control... controls)
username
- The username for this bind request. It must not be null
or empty.password
- The password for this bind request. It must not be null
or empty.controls
- The set of controls to include in the bind request. It may
be null
or empty if no controls are needed.public SCRAMSHA1BindRequest(@NotNull java.lang.String username, @NotNull byte[] password, @Nullable Control... controls)
username
- The username for this bind request. It must not be null
or empty.password
- The password for this bind request. It must not be null
or empty.controls
- The set of controls to include in the bind request. It may
be null
or empty if no controls are needed.@NotNull public java.lang.String getSASLMechanismName()
getSASLMechanismName
in class SASLBindRequest
@NotNull protected java.lang.String getDigestAlgorithmName()
getDigestAlgorithmName
in class SCRAMBindRequest
@NotNull protected java.lang.String getMACAlgorithmName()
getMACAlgorithmName
in class SCRAMBindRequest
@NotNull public SCRAMSHA1BindRequest getRebindRequest(@NotNull java.lang.String host, int port)
getRebindRequest
in class SCRAMBindRequest
host
- The address of the directory server to which the connection
is established.port
- The port of the directory server to which the connection is
established.null
to indicate that automatic
re-binding is not supported for this type of bind request.@NotNull public SCRAMSHA1BindRequest duplicate()
duplicate
in interface ReadOnlyLDAPRequest
duplicate
in class SCRAMBindRequest
@NotNull public SCRAMSHA1BindRequest duplicate(@Nullable Control[] controls)
duplicate
in interface ReadOnlyLDAPRequest
duplicate
in class SCRAMBindRequest
controls
- The set of controls to include in the duplicate request.public void toString(@NotNull java.lang.StringBuilder buffer)
toString
in interface ReadOnlyLDAPRequest
toString
in class SCRAMBindRequest
buffer
- The buffer to which to append a string representation of
this request.public void toCode(@NotNull java.util.List<java.lang.String> lineList, @NotNull java.lang.String requestID, int indentSpaces, boolean includeProcessing)
toCode
in interface ReadOnlyLDAPRequest
toCode
in class SCRAMBindRequest
lineList
- The list to which the source code lines should
be added.requestID
- The name that should be used as an identifier
for the request. If this is null
or
empty, then a generic ID will be used.indentSpaces
- The number of spaces that should be used to
indent the generated code. It must not be
negative.includeProcessing
- Indicates whether the generated code should
include code required to actually process the
request and handle the result (if true
),
or just to generate the request (if
false
).