Class JDAPBindRequest

  • All Implemented Interfaces:
    JDAPProtocolOp

    public class JDAPBindRequest
    extends java.lang.Object
    implements JDAPProtocolOp
    This class implements the bind request. This object is sent to the ldap server.
     BindRequest ::= [APPLICATION 0] SEQUENCE {
       version INTEGER(1..127) ,
       name LDAPDN,
       authentication CHOICE {
         simple [0] OCTET STRING,
         krbv42LDAP [1] OCTET STRING,
         krbv42DSA [2] OCTET STRING
       }
     }
     
    Note that LDAPv3 bind reuqest is structured as follows:
     BindRequest ::= [APPLICATION 0] SEQUENCE {
       version INTEGER (1..127)
       name LDAPDN,
       authentication AuthenticationChoice
     }
     AuthenticationChoice ::= CHOICE {
       simple [0] OCTET STRING,
              -- 1 and 2 reserved
       sasl [3] SaslCredentials
     }
     SaslCredentials ::= SEQUENCE {
       mechanism LDAPString,
       credentials OCTET STRING
     }
     
    Version:
    1.0
    • Field Detail

      • m_version

        protected int m_version
        Internal variables
      • m_name

        protected java.lang.String m_name
      • m_password

        protected java.lang.String m_password
      • m_mechanism

        protected java.lang.String m_mechanism
      • m_credentials

        protected byte[] m_credentials
    • Constructor Detail

      • JDAPBindRequest

        public JDAPBindRequest​(int version,
                               java.lang.String name,
                               java.lang.String password)
        Constructs anonymous or simple bind request.
        Parameters:
        version - version
        name - distinguished name
        password - password
      • JDAPBindRequest

        public JDAPBindRequest​(int version,
                               java.lang.String name,
                               java.lang.String mechanism,
                               byte[] credentials)
        Constructs a LDAP v3.0 SaslCredentials bind request.
        Parameters:
        version - version
        name - distinguished name
        mechanism - mechanism (must not be null)
        credentials - credientials
    • Method Detail

      • getType

        public int getType()
        Retrieves the protocol operation type.
        Specified by:
        getType in interface JDAPProtocolOp
        Returns:
        protocol type
      • getBERElement

        public BERElement getBERElement()
        Retrieves the ber representation of the request.
        Specified by:
        getBERElement in interface JDAPProtocolOp
        Returns:
        ber representation
      • getParamString

        public java.lang.String getParamString()
        Retrieves the string representation of the request parameters.
        Returns:
        string representation parameters
      • toString

        public java.lang.String toString()
        Retrieves the string representation of the request.
        Specified by:
        toString in interface JDAPProtocolOp
        Overrides:
        toString in class java.lang.Object
        Returns:
        string representation