Package org.opends.server.protocols.ldap
Class BindRequestProtocolOp
- java.lang.Object
-
- org.opends.server.protocols.ldap.ProtocolOp
-
- org.opends.server.protocols.ldap.BindRequestProtocolOp
-
public class BindRequestProtocolOp extends ProtocolOp
This class defines the structures and methods for an LDAP bind request protocol op, which is used to authenticate a user to the Directory Server.
-
-
Constructor Summary
Constructors Constructor Description BindRequestProtocolOp(ByteString dn, int protocolVersion, ByteString simplePassword)Creates a new bind request protocol op to perform simple authentication with the provided DN and password.BindRequestProtocolOp(ByteString dn, String saslMechanism, ByteString saslCredentials)Creates a new bind request protocol op to perform SASL authentication with the provided information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthenticationTypegetAuthenticationType()Retrieves the authentication type for this bind request.ByteStringgetDN()Retrieves the DN for this bind request.StringgetProtocolOpName()Retrieves the name for this protocol op type.intgetProtocolVersion()Retrieves the protocol version for this bind request.ByteStringgetSASLCredentials()Retrieves the SASL credentials for this bind request.StringgetSASLMechanism()Retrieves the SASL mechanism for this bind request.ByteStringgetSimplePassword()Retrieves the simple authentication password for this bind request.bytegetType()Retrieves the BER type for this protocol op.voidtoString(StringBuilder buffer)Appends a string representation of this LDAP protocol op to the provided buffer.voidtoString(StringBuilder buffer, int indent)Appends a multi-line string representation of this LDAP protocol op to the provided buffer.voidwrite(ASN1Writer stream)Writes this protocol op to an ASN.1 output stream.-
Methods inherited from class org.opends.server.protocols.ldap.ProtocolOp
toString
-
-
-
-
Constructor Detail
-
BindRequestProtocolOp
public BindRequestProtocolOp(ByteString dn, int protocolVersion, ByteString simplePassword)
Creates a new bind request protocol op to perform simple authentication with the provided DN and password.- Parameters:
dn- The DN for this bind request.protocolVersion- The LDAP protocol version for this bind request.simplePassword- The password for this bind request.
-
BindRequestProtocolOp
public BindRequestProtocolOp(ByteString dn, String saslMechanism, ByteString saslCredentials)
Creates a new bind request protocol op to perform SASL authentication with the provided information.- Parameters:
dn- The DN for this bind request.saslMechanism- The SASL mechanism for this bind request.saslCredentials- The SASL credentials for this bind request.
-
-
Method Detail
-
getDN
public ByteString getDN()
Retrieves the DN for this bind request.- Returns:
- The DN for this bind request.
-
getProtocolVersion
public int getProtocolVersion()
Retrieves the protocol version for this bind request.- Returns:
- The protocol version for this bind request.
-
getAuthenticationType
public AuthenticationType getAuthenticationType()
Retrieves the authentication type for this bind request.- Returns:
- The authentication type for this bind request.
-
getSimplePassword
public ByteString getSimplePassword()
Retrieves the simple authentication password for this bind request.- Returns:
- The simple authentication password for this bind request, or
nullif this is a SASL bind request.
-
getSASLMechanism
public String getSASLMechanism()
Retrieves the SASL mechanism for this bind request.- Returns:
- The SASL mechanism for this bind request, or
nullif this is a simple bind request.
-
getSASLCredentials
public ByteString getSASLCredentials()
Retrieves the SASL credentials for this bind request.- Returns:
- The SASL credentials for this bind request, or
nullif there are none or if this is a simple bind request.
-
getType
public byte getType()
Retrieves the BER type for this protocol op.- Specified by:
getTypein classProtocolOp- Returns:
- The BER type for this protocol op.
-
getProtocolOpName
public String getProtocolOpName()
Retrieves the name for this protocol op type.- Specified by:
getProtocolOpNamein classProtocolOp- Returns:
- The name for this protocol op type.
-
write
public void write(ASN1Writer stream) throws IOException
Writes this protocol op to an ASN.1 output stream.- Specified by:
writein classProtocolOp- Parameters:
stream- The ASN.1 output stream to write to.- Throws:
IOException- If a problem occurs while writing to the stream.
-
toString
public void toString(StringBuilder buffer)
Appends a string representation of this LDAP protocol op to the provided buffer.- Specified by:
toStringin classProtocolOp- Parameters:
buffer- The buffer to which the string should be appended.
-
toString
public void toString(StringBuilder buffer, int indent)
Appends a multi-line string representation of this LDAP protocol op to the provided buffer.- Specified by:
toStringin classProtocolOp- Parameters:
buffer- The buffer to which the information should be appended.indent- The number of spaces from the margin that the lines should be indented.
-
-