public class BindRequest extends AbstractRequest implements RequestWithResponse, AbandonableRequest
Constructor and Description |
---|
BindRequest()
Creates a new instance of BindRequest.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getCredentials()
Gets the simple credentials associated with a simple authentication
attempt or null if this request uses SASL authentication mechanisms.
|
String |
getName()
Gets the distinguished name of the subject in this authentication
request.
|
String |
getSaslMechanism()
Gets the SASL mechanism String associated with this BindRequest if the
bind operation is using SASL.
|
int |
getVersion()
Gets the Ldap protocol version used.
|
boolean |
isSimple()
Checks to see if the authentication mechanism is simple and not SASL
based.
|
boolean |
isVersion3()
Checks to see if the Ldap v3 protocol is used.
|
BindRequest |
setCredentials(byte[] credentials)
Sets the simple credentials associated with a simple authentication
attempt ignored if this request uses SASL authentication mechanisms.
|
BindRequest |
setCredentials(String credentials)
Sets the simple credentials associated with a simple authentication
attempt ignored if this request uses SASL authentication mechanisms.
|
BindRequest |
setName(String name)
Sets the distinguished name of the subject in this authentication
request.
|
BindRequest |
setSasl()
Sets the authentication mechanism to SASL
|
BindRequest |
setSaslMechanism(String saslMechanism)
Sets the SASL mechanism String associated with this BindRequest if the
bind operation is using SASL.
|
BindRequest |
setVersion(int version)
Sets whether or not the LDAP v3 or v2 protocol is used.
|
String |
toString()
Get a String representation of a BindRequest
|
getTimeout, setTimeout
add, getControl, getControls, getMessageId, hasControl, remove, setMessageId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getTimeout, setTimeout
add, getControl, getControls, getMessageId, hasControl, remove, setMessageId
public byte[] getCredentials()
public BindRequest setCredentials(byte[] credentials)
credentials
- the credentials if authentication is simple, null otherwisepublic BindRequest setCredentials(String credentials)
credentials
- the credentials if authentication is simple, null otherwisepublic String getName()
public BindRequest setName(String name)
name
- the DN of the authenticating user - leave null for annonymous
user.public String getSaslMechanism()
public BindRequest setSaslMechanism(String saslMechanism)
saslMechanism
- the SASL mechanismpublic int getVersion()
public BindRequest setVersion(int version)
version
- The version. Should be 3 or 2public boolean isSimple()
public boolean isVersion3()
public BindRequest setSasl()
public String toString()
toString
in class AbstractMessage
Copyright © 2009–2014 The Apache Software Foundation. All rights reserved.