@Extensible @ThreadSafety(level=INTERFACE_NOT_THREADSAFE) public abstract class SCRAMBindRequest extends SASLBindRequest
CRED_TYPE_SASL
VERSION_ELEMENT
Constructor and Description |
---|
SCRAMBindRequest(java.lang.String username,
ASN1OctetString password,
Control... controls)
Creates a new SCRAM bind request with the provided information.
|
Modifier and Type | Method and Description |
---|---|
abstract SCRAMBindRequest |
duplicate()
Creates a new instance of this LDAP request that may be modified without
impacting this request.
|
abstract SCRAMBindRequest |
duplicate(Control[] controls)
Creates a new instance of this LDAP request that may be modified without
impacting this request.
|
protected abstract java.lang.String |
getDigestAlgorithmName()
Retrieves the name of the digest algorithm that will be used in the
authentication processing.
|
protected abstract java.lang.String |
getMACAlgorithmName()
Retrieves the name of the MAC algorithm that will be used in the
authentication processing.
|
byte[] |
getPasswordBytes()
Retrieves the bytes that comprise the password for this bind request.
|
java.lang.String |
getPasswordString()
Retrieves the password for this bind request, as a string.
|
abstract SCRAMBindRequest |
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 |
getUsername()
Retrieves the username for this bind request.
|
protected BindResult |
process(LDAPConnection connection,
int depth)
Sends this bind request to the target server over the provided connection
and returns the corresponding response.
|
abstract 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.
|
abstract void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this request to the provided buffer.
|
getBindType, getLastMessageID, getSASLMechanismName, responseReceived, sendBindRequest, sendMessage
getOperationType
followReferrals, getControl, getControlList, getControls, getIntermediateResponseListener, getReferralConnector, getResponseTimeoutMillis, hasControl, hasControl, setFollowReferrals, setIntermediateResponseListener, setReferralConnector, setResponseTimeoutMillis, toString
public SCRAMBindRequest(java.lang.String username, ASN1OctetString password, 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 final java.lang.String getUsername()
public final java.lang.String getPasswordString()
public final byte[] getPasswordBytes()
protected abstract java.lang.String getDigestAlgorithmName()
protected abstract java.lang.String getMACAlgorithmName()
protected final BindResult process(LDAPConnection connection, int depth) throws LDAPException
process
in class BindRequest
connection
- The connection to use to send this bind request to the
server and read the associated response.depth
- The current referral depth for this request. It should
always be one for the initial request, and should only
be incremented when following referrals.LDAPException
- If a problem occurs while sending the request or
reading the response.public abstract SCRAMBindRequest getRebindRequest(java.lang.String host, int port)
getRebindRequest
in class BindRequest
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.public abstract SCRAMBindRequest duplicate()
duplicate
in interface ReadOnlyLDAPRequest
duplicate
in class BindRequest
public abstract SCRAMBindRequest duplicate(Control[] controls)
duplicate
in interface ReadOnlyLDAPRequest
duplicate
in class BindRequest
controls
- The set of controls to include in the duplicate request.public abstract void toString(java.lang.StringBuilder buffer)
toString
in interface ReadOnlyLDAPRequest
toString
in class LDAPRequest
buffer
- The buffer to which to append a string representation of
this request.public abstract void toCode(java.util.List<java.lang.String> lineList, java.lang.String requestID, int indentSpaces, boolean includeProcessing)
toCode
in interface ReadOnlyLDAPRequest
toCode
in class SASLBindRequest
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
).