Package com.unboundid.ldap.sdk
Class SCRAMSHA512BindRequest
- java.lang.Object
-
- com.unboundid.ldap.sdk.LDAPRequest
-
- com.unboundid.ldap.sdk.BindRequest
-
- com.unboundid.ldap.sdk.SASLBindRequest
-
- com.unboundid.ldap.sdk.SCRAMBindRequest
-
- com.unboundid.ldap.sdk.SCRAMSHA512BindRequest
-
- All Implemented Interfaces:
ReadOnlyLDAPRequest,java.io.Serializable
@ThreadSafety(level=NOT_THREADSAFE) public final class SCRAMSHA512BindRequest extends SCRAMBindRequest
This class provides an implementation of the SCRAM-SHA-512 SASL mechanism, which is an SCRAM mechanism that uses a SHA-512 digest algorithm and an HmacSHA512 MAC algorithm.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSCRAM_SHA_512_MECHANISM_NAMEThe name for the SCRAM-SHA-512 SASL mechanism.-
Fields inherited from class com.unboundid.ldap.sdk.SASLBindRequest
CRED_TYPE_SASL
-
Fields inherited from class com.unboundid.ldap.sdk.BindRequest
VERSION_ELEMENT
-
-
Constructor Summary
Constructors Constructor Description SCRAMSHA512BindRequest(java.lang.String username, byte[] password, Control... controls)Creates a new SCRAM-SHA-512 bind request with the provided information.SCRAMSHA512BindRequest(java.lang.String username, java.lang.String password, Control... controls)Creates a new SCRAM-SHA-512 bind request with the provided information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SCRAMSHA512BindRequestduplicate()Creates a new instance of this LDAP request that may be modified without impacting this request.SCRAMSHA512BindRequestduplicate(Control[] controls)Creates a new instance of this LDAP request that may be modified without impacting this request.protected java.lang.StringgetDigestAlgorithmName()Retrieves the name of the digest algorithm that will be used in the authentication processing.protected java.lang.StringgetMACAlgorithmName()Retrieves the name of the MAC algorithm that will be used in the authentication processing.SCRAMSHA512BindRequestgetRebindRequest(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.StringgetSASLMechanismName()Retrieves the name of the SASL mechanism used in this SASL bind request.voidtoCode(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.voidtoString(java.lang.StringBuilder buffer)Appends a string representation of this request to the provided buffer.-
Methods inherited from class com.unboundid.ldap.sdk.SCRAMBindRequest
getPasswordBytes, getPasswordString, getUsername, process
-
Methods inherited from class com.unboundid.ldap.sdk.SASLBindRequest
getBindType, getLastMessageID, responseReceived, sendBindRequest, sendMessage
-
Methods inherited from class com.unboundid.ldap.sdk.BindRequest
getOperationType
-
Methods inherited from class com.unboundid.ldap.sdk.LDAPRequest
followReferrals, getControl, getControlList, getControls, getIntermediateResponseListener, getReferralConnector, getReferralConnectorInternal, getReferralDepth, getResponseTimeoutMillis, hasControl, hasControl, setFollowReferrals, setIntermediateResponseListener, setReferralConnector, setReferralDepth, setResponseTimeoutMillis, toString
-
-
-
-
Field Detail
-
SCRAM_SHA_512_MECHANISM_NAME
@NotNull public static final java.lang.String SCRAM_SHA_512_MECHANISM_NAME
The name for the SCRAM-SHA-512 SASL mechanism.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SCRAMSHA512BindRequest
public SCRAMSHA512BindRequest(@NotNull java.lang.String username, @NotNull java.lang.String password, @Nullable Control... controls)
Creates a new SCRAM-SHA-512 bind request with the provided information.- Parameters:
username- The username for this bind request. It must not benullor empty.password- The password for this bind request. It must not benullor empty.controls- The set of controls to include in the bind request. It may benullor empty if no controls are needed.
-
SCRAMSHA512BindRequest
public SCRAMSHA512BindRequest(@NotNull java.lang.String username, @NotNull byte[] password, @Nullable Control... controls)
Creates a new SCRAM-SHA-512 bind request with the provided information.- Parameters:
username- The username for this bind request. It must not benullor empty.password- The password for this bind request. It must not benullor empty.controls- The set of controls to include in the bind request. It may benullor empty if no controls are needed.
-
-
Method Detail
-
getSASLMechanismName
@NotNull public java.lang.String getSASLMechanismName()
Retrieves the name of the SASL mechanism used in this SASL bind request.- Specified by:
getSASLMechanismNamein classSASLBindRequest- Returns:
- The name of the SASL mechanism used in this SASL bind request.
-
getDigestAlgorithmName
@NotNull protected java.lang.String getDigestAlgorithmName()
Retrieves the name of the digest algorithm that will be used in the authentication processing.- Specified by:
getDigestAlgorithmNamein classSCRAMBindRequest- Returns:
- The name of the digest algorithm that will be used in the authentication processing.
-
getMACAlgorithmName
@NotNull protected java.lang.String getMACAlgorithmName()
Retrieves the name of the MAC algorithm that will be used in the authentication processing.- Specified by:
getMACAlgorithmNamein classSCRAMBindRequest- Returns:
- The name of the MAC algorithm that will be used in the authentication processing.
-
getRebindRequest
@NotNull public SCRAMSHA512BindRequest getRebindRequest(@NotNull 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. This may be used in an attempt to automatically re-establish a connection that is lost, or potentially when following a referral to another directory instance.
It is recommended that all bind request types which implement this capability be implemented so that the elements needed to create a new request are immutable. If this is not done, then changes made to a bind request object may alter the authentication/authorization identity and/or credentials associated with that request so that a rebind request created from it will not match the original request used to authenticate on a connection.- Specified by:
getRebindRequestin classSCRAMBindRequest- Parameters:
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.- Returns:
- A bind request that may be used to re-bind using the same
authentication type and credentials as previously used to perform
the initial bind, or
nullto indicate that automatic re-binding is not supported for this type of bind request.
-
duplicate
@NotNull public SCRAMSHA512BindRequest duplicate()
Creates a new instance of this LDAP request that may be modified without impacting this request.- Specified by:
duplicatein interfaceReadOnlyLDAPRequest- Specified by:
duplicatein classSCRAMBindRequest- Returns:
- A new instance of this LDAP request that may be modified without impacting this request.
-
duplicate
@NotNull public SCRAMSHA512BindRequest duplicate(@Nullable Control[] controls)
Creates a new instance of this LDAP request that may be modified without impacting this request. The provided controls will be used for the new request instead of duplicating the controls from this request.- Specified by:
duplicatein interfaceReadOnlyLDAPRequest- Specified by:
duplicatein classSCRAMBindRequest- Parameters:
controls- The set of controls to include in the duplicate request.- Returns:
- A new instance of this LDAP request that may be modified without impacting this request.
-
toString
public void toString(@NotNull java.lang.StringBuilder buffer)
Appends a string representation of this request to the provided buffer.- Specified by:
toStringin interfaceReadOnlyLDAPRequest- Specified by:
toStringin classSCRAMBindRequest- Parameters:
buffer- The buffer to which to append a string representation of this request.
-
toCode
public void toCode(@NotNull java.util.List<java.lang.String> lineList, @NotNull 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.- Specified by:
toCodein interfaceReadOnlyLDAPRequest- Specified by:
toCodein classSCRAMBindRequest- Parameters:
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 isnullor 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 (iftrue), or just to generate the request (iffalse).
-
-