Package com.unboundid.ldap.sdk
Class GSSAPIBindRequest
- java.lang.Object
-
- com.unboundid.ldap.sdk.LDAPRequest
-
- com.unboundid.ldap.sdk.BindRequest
-
- com.unboundid.ldap.sdk.SASLBindRequest
-
- com.unboundid.ldap.sdk.GSSAPIBindRequest
-
- All Implemented Interfaces:
ReadOnlyLDAPRequest
,java.io.Serializable
,java.security.PrivilegedExceptionAction<java.lang.Object>
,javax.security.auth.callback.CallbackHandler
@NotMutable @ThreadSafety(level=NOT_THREADSAFE) public final class GSSAPIBindRequest extends SASLBindRequest implements javax.security.auth.callback.CallbackHandler, java.security.PrivilegedExceptionAction<java.lang.Object>
This class provides a SASL GSSAPI bind request implementation as described in RFC 4752. It provides the ability to authenticate to a directory server using Kerberos V, which can serve as a kind of single sign-on mechanism that may be shared across client applications that support Kerberos.
This class uses the Java Authentication and Authorization Service (JAAS) behind the scenes to perform all Kerberos processing. This framework requires a configuration file to indicate the underlying mechanism to be used. It is possible for clients to explicitly specify the path to the configuration file that should be used, but if none is given then a default file will be created and used. This default file should be sufficient for Sun-provided JVMs, but a custom file may be required for JVMs provided by other vendors.
Elements included in a GSSAPI bind request include:- Authentication ID -- A string which identifies the user that is attempting to authenticate. It should be the user's Kerberos principal.
- Authorization ID -- An optional string which specifies an alternate authorization identity that should be used for subsequent operations requested on the connection. Like the authentication ID, the authorization ID should be a Kerberos principal.
- KDC Address -- An optional string which specifies the IP address or resolvable name for the Kerberos key distribution center. If this is not provided, an attempt will be made to determine the appropriate value from the system configuration.
- Realm -- An optional string which specifies the realm into which the user should authenticate. If this is not provided, an attempt will be made to determine the appropriate value from the system configuration
- Password -- The clear-text password for the target user in the Kerberos realm.
Example
The following example demonstrates the process for performing a GSSAPI bind against a directory server with a username of "john.doe" and a password of "password":GSSAPIBindRequestProperties gssapiProperties = new GSSAPIBindRequestProperties("john.doe@EXAMPLE.COM", "password"); gssapiProperties.setKDCAddress("kdc.example.com"); gssapiProperties.setRealm("EXAMPLE.COM"); GSSAPIBindRequest bindRequest = new GSSAPIBindRequest(gssapiProperties); BindResult bindResult; try { bindResult = connection.bind(bindRequest); // If we get here, then the bind was successful. } catch (LDAPException le) { // The bind failed for some reason. bindResult = new BindResult(le.toLDAPResult()); ResultCode resultCode = le.getResultCode(); String errorMessageFromServer = le.getDiagnosticMessage(); }
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
GSSAPI_MECHANISM_NAME
The name for the GSSAPI 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 GSSAPIBindRequest(GSSAPIBindRequestProperties gssapiProperties, Control... controls)
Creates a new SASL GSSAPI bind request with the provided set of properties.GSSAPIBindRequest(java.lang.String authenticationID, byte[] password)
Creates a new SASL GSSAPI bind request with the provided authentication ID and password.GSSAPIBindRequest(java.lang.String authenticationID, byte[] password, Control[] controls)
Creates a new SASL GSSAPI bind request with the provided authentication ID and password.GSSAPIBindRequest(java.lang.String authenticationID, java.lang.String password)
Creates a new SASL GSSAPI bind request with the provided authentication ID and password.GSSAPIBindRequest(java.lang.String authenticationID, java.lang.String authorizationID, byte[] password, java.lang.String realm, java.lang.String kdcAddress, java.lang.String configFilePath)
Creates a new SASL GSSAPI bind request with the provided information.GSSAPIBindRequest(java.lang.String authenticationID, java.lang.String authorizationID, byte[] password, java.lang.String realm, java.lang.String kdcAddress, java.lang.String configFilePath, Control[] controls)
Creates a new SASL GSSAPI bind request with the provided information.GSSAPIBindRequest(java.lang.String authenticationID, java.lang.String password, Control[] controls)
Creates a new SASL GSSAPI bind request with the provided authentication ID and password.GSSAPIBindRequest(java.lang.String authenticationID, java.lang.String authorizationID, java.lang.String password, java.lang.String realm, java.lang.String kdcAddress, java.lang.String configFilePath)
Creates a new SASL GSSAPI bind request with the provided information.GSSAPIBindRequest(java.lang.String authenticationID, java.lang.String authorizationID, java.lang.String password, java.lang.String realm, java.lang.String kdcAddress, java.lang.String configFilePath, Control[] controls)
Creates a new SASL GSSAPI bind request with the provided information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GSSAPIBindRequest
duplicate()
Creates a new instance of this LDAP request that may be modified without impacting this request.GSSAPIBindRequest
duplicate(Control[] controls)
Creates a new instance of this LDAP request that may be modified without impacting this request.boolean
enableGSSAPIDebugging()
Indicates whether JVM-level debugging should be enabled for GSSAPI bind processing.java.util.List<SASLQualityOfProtection>
getAllowedQoP()
Retrieves the list of allowed qualities of protection that may be used for communication that occurs on the connection after the authentication has completed, in order from most preferred to least preferred.java.lang.String
getAuthenticationID()
Retrieves the authentication ID for the GSSAPI bind request, if defined.java.lang.String
getAuthorizationID()
Retrieves the authorization ID for this bind request, if any.java.lang.String
getConfigFilePath()
Retrieves the path to the JAAS configuration file that will be used during authentication processing.java.lang.Boolean
getIsInitiator()
Indicates whether the client should be configured so that it explicitly indicates whether it is the initiator or the acceptor.java.lang.String
getKDCAddress()
Retrieves the address of the Kerberos key distribution center.java.lang.String
getKeyTabPath()
Retrieves the path to the keytab file from which to obtain the user credentials.int
getLastMessageID()
Retrieves the message ID for the last LDAP message sent using this request.byte[]
getPasswordBytes()
Retrieves the bytes that comprise the the password for this bind request, if defined.java.lang.String
getPasswordString()
Retrieves the string representation of the password for this bind request, if defined.java.lang.String
getRealm()
Retrieves the realm for this bind request, if any.GSSAPIBindRequest
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.java.lang.String
getServicePrincipalProtocol()
Retrieves the protocol specified in the service principal that the directory server uses for its communication with the KDC.java.util.Set<java.lang.String>
getSuppressedSystemProperties()
Retrieves a set of system properties that will not be altered by GSSAPI processing.java.lang.String
getTicketCachePath()
Retrieves the path to the Kerberos ticket cache file that should be used during authentication, if defined.void
handle(javax.security.auth.callback.Callback[] callbacks)
Handles any necessary callbacks required for SASL authentication.protected BindResult
process(LDAPConnection connection, int depth)
Sends this bind request to the target server over the provided connection and returns the corresponding response.boolean
refreshKrb5Config()
Indicates whether to refresh the configuration before the JAASlogin
method is called.boolean
renewTGT()
Indicates whether to attempt to renew the client's ticket-granting ticket (TGT) if an existing Kerberos session is used to authenticate.boolean
requireCachedCredentials()
Indicates whether GSSAPI authentication should only occur using an existing Kerberos session.java.lang.Object
run()
Perform the privileged portion of the authentication processing.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.boolean
useKeyTab()
Indicates whether to use a keytab to obtain the user credentials.boolean
useSubjectCredentialsOnly()
Indicates whether to allow the client to use credentials that are outside of the current subject, obtained via some system-specific mechanism.boolean
useTicketCache()
Indicates whether to enable the use of a ticket cache to to avoid the need to supply credentials if the client already has an existing Kerberos session.-
Methods inherited from class com.unboundid.ldap.sdk.SASLBindRequest
getBindType, 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, getResponseTimeoutMillis, hasControl, hasControl, setFollowReferrals, setIntermediateResponseListener, setReferralConnector, setResponseTimeoutMillis, toString
-
-
-
-
Field Detail
-
GSSAPI_MECHANISM_NAME
@NotNull public static final java.lang.String GSSAPI_MECHANISM_NAME
The name for the GSSAPI SASL mechanism.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GSSAPIBindRequest
public GSSAPIBindRequest(@NotNull java.lang.String authenticationID, @NotNull java.lang.String password) throws LDAPException
Creates a new SASL GSSAPI bind request with the provided authentication ID and password.- Parameters:
authenticationID
- The authentication ID for this bind request. It must not benull
.password
- The password for this bind request. It must not benull
.- Throws:
LDAPException
- If a problem occurs while creating the JAAS configuration file to use during authentication processing.
-
GSSAPIBindRequest
public GSSAPIBindRequest(@NotNull java.lang.String authenticationID, @NotNull byte[] password) throws LDAPException
Creates a new SASL GSSAPI bind request with the provided authentication ID and password.- Parameters:
authenticationID
- The authentication ID for this bind request. It must not benull
.password
- The password for this bind request. It must not benull
.- Throws:
LDAPException
- If a problem occurs while creating the JAAS configuration file to use during authentication processing.
-
GSSAPIBindRequest
public GSSAPIBindRequest(@NotNull java.lang.String authenticationID, @NotNull java.lang.String password, @Nullable Control[] controls) throws LDAPException
Creates a new SASL GSSAPI bind request with the provided authentication ID and password.- Parameters:
authenticationID
- The authentication ID for this bind request. It must not benull
.password
- The password for this bind request. It must not benull
.controls
- The set of controls to include in the request.- Throws:
LDAPException
- If a problem occurs while creating the JAAS configuration file to use during authentication processing.
-
GSSAPIBindRequest
public GSSAPIBindRequest(@NotNull java.lang.String authenticationID, @NotNull byte[] password, @Nullable Control[] controls) throws LDAPException
Creates a new SASL GSSAPI bind request with the provided authentication ID and password.- Parameters:
authenticationID
- The authentication ID for this bind request. It must not benull
.password
- The password for this bind request. It must not benull
.controls
- The set of controls to include in the request.- Throws:
LDAPException
- If a problem occurs while creating the JAAS configuration file to use during authentication processing.
-
GSSAPIBindRequest
public GSSAPIBindRequest(@NotNull java.lang.String authenticationID, @Nullable java.lang.String authorizationID, @NotNull java.lang.String password, @Nullable java.lang.String realm, @Nullable java.lang.String kdcAddress, @Nullable java.lang.String configFilePath) throws LDAPException
Creates a new SASL GSSAPI bind request with the provided information.- Parameters:
authenticationID
- The authentication ID for this bind request. It must not benull
.authorizationID
- The authorization ID for this bind request. It may benull
if no alternate authorization ID should be used.password
- The password for this bind request. It must not benull
.realm
- The realm to use for the authentication. It may benull
to attempt to use the default realm from the system configuration.kdcAddress
- The address of the Kerberos key distribution center. It may benull
to attempt to use the default KDC from the system configuration.configFilePath
- The path to the JAAS configuration file to use for the authentication processing. It may benull
to use the default JAAS configuration.- Throws:
LDAPException
- If a problem occurs while creating the JAAS configuration file to use during authentication processing.
-
GSSAPIBindRequest
public GSSAPIBindRequest(@NotNull java.lang.String authenticationID, @Nullable java.lang.String authorizationID, @NotNull byte[] password, @Nullable java.lang.String realm, @Nullable java.lang.String kdcAddress, @Nullable java.lang.String configFilePath) throws LDAPException
Creates a new SASL GSSAPI bind request with the provided information.- Parameters:
authenticationID
- The authentication ID for this bind request. It must not benull
.authorizationID
- The authorization ID for this bind request. It may benull
if no alternate authorization ID should be used.password
- The password for this bind request. It must not benull
.realm
- The realm to use for the authentication. It may benull
to attempt to use the default realm from the system configuration.kdcAddress
- The address of the Kerberos key distribution center. It may benull
to attempt to use the default KDC from the system configuration.configFilePath
- The path to the JAAS configuration file to use for the authentication processing. It may benull
to use the default JAAS configuration.- Throws:
LDAPException
- If a problem occurs while creating the JAAS configuration file to use during authentication processing.
-
GSSAPIBindRequest
public GSSAPIBindRequest(@NotNull java.lang.String authenticationID, @Nullable java.lang.String authorizationID, @NotNull java.lang.String password, @Nullable java.lang.String realm, @Nullable java.lang.String kdcAddress, @Nullable java.lang.String configFilePath, @Nullable Control[] controls) throws LDAPException
Creates a new SASL GSSAPI bind request with the provided information.- Parameters:
authenticationID
- The authentication ID for this bind request. It must not benull
.authorizationID
- The authorization ID for this bind request. It may benull
if no alternate authorization ID should be used.password
- The password for this bind request. It must not benull
.realm
- The realm to use for the authentication. It may benull
to attempt to use the default realm from the system configuration.kdcAddress
- The address of the Kerberos key distribution center. It may benull
to attempt to use the default KDC from the system configuration.configFilePath
- The path to the JAAS configuration file to use for the authentication processing. It may benull
to use the default JAAS configuration.controls
- The set of controls to include in the request.- Throws:
LDAPException
- If a problem occurs while creating the JAAS configuration file to use during authentication processing.
-
GSSAPIBindRequest
public GSSAPIBindRequest(@NotNull java.lang.String authenticationID, @Nullable java.lang.String authorizationID, @NotNull byte[] password, @Nullable java.lang.String realm, @Nullable java.lang.String kdcAddress, @Nullable java.lang.String configFilePath, @Nullable Control[] controls) throws LDAPException
Creates a new SASL GSSAPI bind request with the provided information.- Parameters:
authenticationID
- The authentication ID for this bind request. It must not benull
.authorizationID
- The authorization ID for this bind request. It may benull
if no alternate authorization ID should be used.password
- The password for this bind request. It must not benull
.realm
- The realm to use for the authentication. It may benull
to attempt to use the default realm from the system configuration.kdcAddress
- The address of the Kerberos key distribution center. It may benull
to attempt to use the default KDC from the system configuration.configFilePath
- The path to the JAAS configuration file to use for the authentication processing. It may benull
to use the default JAAS configuration.controls
- The set of controls to include in the request.- Throws:
LDAPException
- If a problem occurs while creating the JAAS configuration file to use during authentication processing.
-
GSSAPIBindRequest
public GSSAPIBindRequest(@NotNull GSSAPIBindRequestProperties gssapiProperties, @Nullable Control... controls) throws LDAPException
Creates a new SASL GSSAPI bind request with the provided set of properties.- Parameters:
gssapiProperties
- The set of properties that should be used for the GSSAPI bind request. It must not benull
.controls
- The set of controls to include in the request.- Throws:
LDAPException
- If a problem occurs while creating the JAAS configuration file to use during authentication processing.
-
-
Method Detail
-
getSASLMechanismName
@NotNull public java.lang.String getSASLMechanismName()
Retrieves the name of the SASL mechanism used in this SASL bind request.- Specified by:
getSASLMechanismName
in classSASLBindRequest
- Returns:
- The name of the SASL mechanism used in this SASL bind request.
-
getAuthenticationID
@Nullable public java.lang.String getAuthenticationID()
Retrieves the authentication ID for the GSSAPI bind request, if defined.- Returns:
- The authentication ID for the GSSAPI bind request, or
null
if an existing Kerberos session should be used.
-
getAuthorizationID
@Nullable public java.lang.String getAuthorizationID()
Retrieves the authorization ID for this bind request, if any.- Returns:
- The authorization ID for this bind request, or
null
if there should not be a separate authorization identity.
-
getPasswordString
@Nullable public java.lang.String getPasswordString()
Retrieves the string representation of the password for this bind request, if defined.- Returns:
- The string representation of the password for this bind request,
or
null
if an existing Kerberos session should be used.
-
getPasswordBytes
@Nullable public byte[] getPasswordBytes()
Retrieves the bytes that comprise the the password for this bind request, if defined.- Returns:
- The bytes that comprise the password for this bind request, or
null
if an existing Kerberos session should be used.
-
getRealm
@Nullable public java.lang.String getRealm()
Retrieves the realm for this bind request, if any.- Returns:
- The realm for this bind request, or
null
if none was defined and the client should attempt to determine the realm from the system configuration.
-
getAllowedQoP
@NotNull public java.util.List<SASLQualityOfProtection> getAllowedQoP()
Retrieves the list of allowed qualities of protection that may be used for communication that occurs on the connection after the authentication has completed, in order from most preferred to least preferred.- Returns:
- The list of allowed qualities of protection that may be used for communication that occurs on the connection after the authentication has completed, in order from most preferred to least preferred.
-
getKDCAddress
@Nullable public java.lang.String getKDCAddress()
Retrieves the address of the Kerberos key distribution center.- Returns:
- The address of the Kerberos key distribution center, or
null
if none was defined and the client should attempt to determine the KDC address from the system configuration.
-
getConfigFilePath
@Nullable public java.lang.String getConfigFilePath()
Retrieves the path to the JAAS configuration file that will be used during authentication processing.- Returns:
- The path to the JAAS configuration file that will be used during authentication processing.
-
getServicePrincipalProtocol
@NotNull public java.lang.String getServicePrincipalProtocol()
Retrieves the protocol specified in the service principal that the directory server uses for its communication with the KDC.- Returns:
- The protocol specified in the service principal that the directory server uses for its communication with the KDC.
-
refreshKrb5Config
public boolean refreshKrb5Config()
Indicates whether to refresh the configuration before the JAASlogin
method is called.- Returns:
true
if the GSSAPI implementation should refresh the configuration before the JAASlogin
method is called, orfalse
if not.
-
useKeyTab
public boolean useKeyTab()
Indicates whether to use a keytab to obtain the user credentials.- Returns:
true
if the GSSAPI login attempt should use a keytab to obtain the user credentials, orfalse
if not.
-
getKeyTabPath
@Nullable public java.lang.String getKeyTabPath()
Retrieves the path to the keytab file from which to obtain the user credentials. This will only be used ifuseKeyTab
returnstrue
.- Returns:
- The path to the keytab file from which to obtain the user
credentials, or
null
if the default keytab location should be used.
-
useTicketCache
public boolean useTicketCache()
Indicates whether to enable the use of a ticket cache to to avoid the need to supply credentials if the client already has an existing Kerberos session.- Returns:
true
if a ticket cache may be used to take advantage of an existing Kerberos session, orfalse
if Kerberos credentials should always be provided.
-
requireCachedCredentials
public boolean requireCachedCredentials()
Indicates whether GSSAPI authentication should only occur using an existing Kerberos session.- Returns:
true
if GSSAPI authentication should only use an existing Kerberos session and should fail if the client does not have an existing session, orfalse
if the client will be allowed to create a new session if one does not already exist.
-
getTicketCachePath
@Nullable public java.lang.String getTicketCachePath()
Retrieves the path to the Kerberos ticket cache file that should be used during authentication, if defined.- Returns:
- The path to the Kerberos ticket cache file that should be used
during authentication, or
null
if the default ticket cache file should be used.
-
renewTGT
public boolean renewTGT()
Indicates whether to attempt to renew the client's ticket-granting ticket (TGT) if an existing Kerberos session is used to authenticate.- Returns:
true
if the client should attempt to renew its ticket-granting ticket if the authentication is processed using an existing Kerberos session, orfalse
if not.
-
useSubjectCredentialsOnly
public boolean useSubjectCredentialsOnly()
Indicates whether to allow the client to use credentials that are outside of the current subject, obtained via some system-specific mechanism.- Returns:
true
if the client will only be allowed to use credentials that are within the current subject, orfalse
if the client will be allowed to use credentials outside the current subject.
-
getIsInitiator
@Nullable public java.lang.Boolean getIsInitiator()
Indicates whether the client should be configured so that it explicitly indicates whether it is the initiator or the acceptor.- Returns:
Boolean.TRUE
if the client should explicitly indicate that it is the GSSAPI initiator,Boolean.FALSE
if the client should explicitly indicate that it is the GSSAPI acceptor, ornull
if the client should not explicitly indicate either state (which is the default behavior unless theGSSAPIBindRequestProperties.setIsInitiator(java.lang.Boolean)
method has been used to explicitly specify a value).
-
getSuppressedSystemProperties
@NotNull public java.util.Set<java.lang.String> getSuppressedSystemProperties()
Retrieves a set of system properties that will not be altered by GSSAPI processing.- Returns:
- A set of system properties that will not be altered by GSSAPI processing.
-
enableGSSAPIDebugging
public boolean enableGSSAPIDebugging()
Indicates whether JVM-level debugging should be enabled for GSSAPI bind processing.- Returns:
true
if JVM-level debugging should be enabled for GSSAPI bind processing, orfalse
if not.
-
process
@NotNull protected BindResult process(@NotNull LDAPConnection connection, int depth) throws LDAPException
Sends this bind request to the target server over the provided connection and returns the corresponding response.- Specified by:
process
in classBindRequest
- Parameters:
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.- Returns:
- The bind response read from the server.
- Throws:
LDAPException
- If a problem occurs while sending the request or reading the response.
-
run
@InternalUseOnly @NotNull public java.lang.Object run() throws LDAPException
Perform the privileged portion of the authentication processing.- Specified by:
run
in interfacejava.security.PrivilegedExceptionAction<java.lang.Object>
- Returns:
null
, since no return value is actually needed.- Throws:
LDAPException
- If a problem occurs during processing.
-
getRebindRequest
@NotNull public GSSAPIBindRequest 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.- Overrides:
getRebindRequest
in classBindRequest
- 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
null
to indicate that automatic re-binding is not supported for this type of bind request.
-
handle
@InternalUseOnly public void handle(@NotNull javax.security.auth.callback.Callback[] callbacks) throws javax.security.auth.callback.UnsupportedCallbackException
Handles any necessary callbacks required for SASL authentication.- Specified by:
handle
in interfacejavax.security.auth.callback.CallbackHandler
- Parameters:
callbacks
- The set of callbacks to be handled.- Throws:
javax.security.auth.callback.UnsupportedCallbackException
- If an unsupported type of callback was received.
-
getLastMessageID
public int getLastMessageID()
Retrieves the message ID for the last LDAP message sent using this request.- Overrides:
getLastMessageID
in classSASLBindRequest
- Returns:
- The message ID for the last LDAP message sent using this request, or -1 if it no LDAP messages have yet been sent using this request.
-
duplicate
@NotNull public GSSAPIBindRequest duplicate()
Creates a new instance of this LDAP request that may be modified without impacting this request.- Specified by:
duplicate
in interfaceReadOnlyLDAPRequest
- Specified by:
duplicate
in classBindRequest
- Returns:
- A new instance of this LDAP request that may be modified without impacting this request.
-
duplicate
@NotNull public GSSAPIBindRequest 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:
duplicate
in interfaceReadOnlyLDAPRequest
- Specified by:
duplicate
in classBindRequest
- 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:
toString
in interfaceReadOnlyLDAPRequest
- Specified by:
toString
in classLDAPRequest
- 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:
toCode
in interfaceReadOnlyLDAPRequest
- Overrides:
toCode
in classSASLBindRequest
- 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 isnull
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 (iftrue
), or just to generate the request (iffalse
).
-
-