|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.slamd.tools.ldapdecoder.protocol.ProtocolOp
com.slamd.tools.ldapdecoder.protocol.BindRequest
public class BindRequest
This class defines an LDAP bind request, which is used to authenticate to a directory server.
| Field Summary | |
|---|---|
static byte |
AUTH_TYPE_SASL
The authentication type that indicates that SASL authentication is to be performed. |
static byte |
AUTH_TYPE_SIMPLE
The authentication type that indicates that simple authentication is to be performed. |
| Constructor Summary | |
|---|---|
BindRequest(int protocolVersion,
java.lang.String bindDN,
java.lang.String bindPassword)
Creates a new bind request using simple authentication with the provided information. |
|
BindRequest(int protocolVersion,
java.lang.String bindDN,
java.lang.String saslMechanism,
ASN1OctetString saslCredentials)
Creates a new bind request using SASL authentication with the provided information. |
|
| Method Summary | |
|---|---|
static BindRequest |
decodeBindRequest(ASN1Element element)
Decodes the provided ASN.1 element as a bind request protocol op. |
ASN1Element |
encode()
Encodes this protocol op to an ASN.1 element. |
byte |
getAuthType()
Retrieves the type of authentication contained in this bind request. |
java.lang.String |
getBindDN()
Retrieves the DN of the user performing the bind. |
java.lang.String |
getBindPassword()
Retrieves the password used for simple authentication. |
java.lang.String |
getProtocolOpType()
Retrieves a user-friendly name for this protocol op. |
int |
getProtocolVersion()
Retrieves the LDAP protocol version used in this bind request. |
ASN1OctetString |
getSASLCredentials()
Retrieves the credentials used for SASL authentication. |
java.lang.String |
getSASLMechanism()
Retrieves the mechanism used for SASL authentication. |
void |
toSLAMDScript(java.io.PrintStream scriptWriter)
Constructs a string representation of this LDAP message in a form that can be written to a SLAMD script. |
java.lang.String |
toString(int indent)
Retrieves a string representation of this protocol op with the specified indent. |
| Methods inherited from class com.slamd.tools.ldapdecoder.protocol.ProtocolOp |
|---|
decode, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final byte AUTH_TYPE_SIMPLE
public static final byte AUTH_TYPE_SASL
| Constructor Detail |
|---|
public BindRequest(int protocolVersion,
java.lang.String bindDN,
java.lang.String bindPassword)
protocolVersion - The LDAP protocol version to use in the bind
request.bindDN - The DN of the user performing the bind.bindPassword - The password of the user performing the bind.
public BindRequest(int protocolVersion,
java.lang.String bindDN,
java.lang.String saslMechanism,
ASN1OctetString saslCredentials)
protocolVersion - The LDAP protocol version to use in the bind
request.bindDN - The DN of the user performing the bind.saslMechanism - The SASL mechanism used to perform the bind.saslCredentials - The SASL credentials to use in the bind.| Method Detail |
|---|
public int getProtocolVersion()
public java.lang.String getBindDN()
public byte getAuthType()
AUTH_TYPE_SIMPLE if simple authentication is to be
performed, or AUTH_TYPE_SASL if SASL authentication
should be used.public java.lang.String getBindPassword()
public java.lang.String getSASLMechanism()
public ASN1OctetString getSASLCredentials()
public ASN1Element encode()
encode in class ProtocolOp
public static BindRequest decodeBindRequest(ASN1Element element)
throws ProtocolException
element - The ASN.1 element to be decoded.
ProtocolException - If a problem occurs while decoding the provided
ASN.1 element as a bind request.public java.lang.String getProtocolOpType()
getProtocolOpType in class ProtocolOppublic java.lang.String toString(int indent)
toString in class ProtocolOpindent - The number of spaces to indent the output.
public void toSLAMDScript(java.io.PrintStream scriptWriter)
toSLAMDScript in class ProtocolOpscriptWriter - The print stream to which the script contents should
be written.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||