Interface BindRequest

All Superinterfaces:
Request
All Known Subinterfaces:
AnonymousSASLBindRequest, CRAMMD5SASLBindRequest, DigestMD5SASLBindRequest, ExternalSASLBindRequest, GenericBindRequest, GSSAPISASLBindRequest, PlainSASLBindRequest, SASLBindRequest, SimpleBindRequest

public interface BindRequest extends Request
The Bind operation allows authentication information to be exchanged between the client and server. The Bind operation should be thought of as the "authenticate" operation.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final byte
    The authentication type value (0xA3) reserved for SASL authentication.
    static final byte
    The authentication type value (0x80) reserved for simple authentication.
  • Method Summary

    Modifier and Type
    Method
    Description
    Adds the provided control to this request.
    Creates a new bind client which can be used to perform the authentication process.
    byte
    Returns the authentication mechanism identifier for this generic bind request as defined by the LDAP protocol.
    <C extends Control>
    C
    getControl(ControlDecoder<C> decoder, DecodeOptions options)
    Decodes and returns the first control in this request having an OID corresponding to the provided control decoder.
    Returns a List containing the controls included with this request.
    Returns the name of the Directory object that the client wishes to bind as.

    Methods inherited from interface org.forgerock.opendj.ldap.requests.Request

    containsControl
  • Field Details

  • Method Details

    • addControl

      Description copied from interface: Request
      Adds the provided control to this request.
      Specified by:
      addControl in interface Request
      Parameters:
      control - The control to be added to this request.
      Returns:
      This request.
    • createBindClient

      Creates a new bind client which can be used to perform the authentication process. This method is called by protocol implementations and is not intended for use by applications.
      Parameters:
      serverName - The non-null fully-qualified host name of the server to authenticate to.
      Returns:
      The new bind client.
      Throws:
      LdapException - If an error occurred while creating the bind client context.
    • getAuthenticationType

      Returns the authentication mechanism identifier for this generic bind request as defined by the LDAP protocol. Note that the value AUTHENTICATION_TYPE_SIMPLE (0x80) is reserved for simple authentication and the value AUTHENTICATION_TYPE_SASL ( 0xA3) is reserved for SASL authentication.
      Returns:
      The authentication mechanism identifier.
    • getControl

      <C extends Control> C getControl(ControlDecoder<C> decoder, DecodeOptions options) throws DecodeException
      Description copied from interface: Request
      Decodes and returns the first control in this request having an OID corresponding to the provided control decoder.
      Specified by:
      getControl in interface Request
      Type Parameters:
      C - The type of control to be decoded and returned.
      Parameters:
      decoder - The control decoder.
      options - The set of decode options which should be used when decoding the control.
      Returns:
      The decoded control, or null if the control is not included with this request.
      Throws:
      DecodeException - If the control could not be decoded because it was malformed in some way (e.g. the control value was missing, or its content could not be decoded).
    • getControls

      Description copied from interface: Request
      Returns a List containing the controls included with this request. The returned List may be modified if permitted by this request.
      Specified by:
      getControls in interface Request
      Returns:
      A List containing the controls.
    • getName

      Returns the name of the Directory object that the client wishes to bind as. The name may be empty (but never null) when used for anonymous binds, or when using SASL authentication. The server shall not dereference any aliases in locating the named object.

      The LDAP protocol defines the Bind name to be a distinguished name, however some LDAP implementations have relaxed this constraint and allow other identities to be used, such as the user's email address.

      Returns:
      The name of the Directory object that the client wishes to bind as.