Record Class BindResult

java.lang.Object
java.lang.Record
org.forgerock.opendj.ldap.messages.BindResult
Record Components:
resultCode - The result code.
matchedDn - The matched DN associated, which may be set as empty or null indicating that none was provided. The returned matched DN will be empty if none was provided (never null).
diagnosticMessage - The diagnostic message, which may be set as empty or null. The returned diagnostic message will be LocalizableMessage.EMPTY if none was provided (never null).
referralUris - The optional referrals are present in a BindResult if the result code is set to ResultCode.REFERRAL, and they are absent with all other result codes.
saslServerCredentials - The server SASL credentials associated with this bind result, which may be null indicating that none was provided.
controls - the List containing the controls.
cause - The throwable cause, which may be null indicating that none was provided.
saslServer - The SaslServer to use by the underlying connection, or null if SASL integrity and/or privacy protection must not be enabled.
All Implemented Interfaces:
ProtocolOp, Response, Result

public record BindResult(ResultCode resultCode, String matchedDn, LocalizableMessage diagnosticMessage, List<String> referralUris, ByteString saslServerCredentials, List<Control> controls, Throwable cause, SaslServer saslServer) extends Record implements Result
A Bind result indicates the status of the client's request for authentication.

A successful Bind operation is indicated by a Bind result with a result code set to ResultCode.SUCCESS and can be determined by invoking the Result.isSuccess() method.

The server SASL credentials field is used as part of a SASL-defined bind mechanism to allow the client to authenticate the server to which it is communicating, or to perform "challenge-response" authentication. If the client bound using a form of simple authentication, or the SASL mechanism does not require the server to return information to the client, then this field shall not be included in the Bind result.

If the server requires the client to send a new SASL Bind request in order to continue the authentication process then the result code is set to ResultCode.SASL_BIND_IN_PROGRESS and can be determined by invoking the isSaslBindInProgress() method.

  • Constructor Details

  • Method Details

    • isSaslBindInProgress

      public boolean isSaslBindInProgress()
      Indicates whether the server requires the client to send a new SASL Bind request with the same SASL mechanism in order to continue the authentication process. This typically occurs during multi-stage (challenge response) authentication.

      Specifically, this method returns true if the result code is equal to ResultCode.SASL_BIND_IN_PROGRESS.

      Returns:
      true if the server requires the client to send a new SASL Bind request, otherwise false.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • resultCode

      public ResultCode resultCode()
      Returns the value of the resultCode record component.
      Specified by:
      resultCode in interface Result
      Returns:
      the value of the resultCode record component
    • matchedDn

      public String matchedDn()
      Returns the value of the matchedDn record component.
      Specified by:
      matchedDn in interface Result
      Returns:
      the value of the matchedDn record component
    • diagnosticMessage

      public LocalizableMessage diagnosticMessage()
      Returns the value of the diagnosticMessage record component.
      Specified by:
      diagnosticMessage in interface Result
      Returns:
      the value of the diagnosticMessage record component
    • referralUris

      public List<String> referralUris()
      Returns the value of the referralUris record component.
      Specified by:
      referralUris in interface Result
      Returns:
      the value of the referralUris record component
    • saslServerCredentials

      public ByteString saslServerCredentials()
      Returns the value of the saslServerCredentials record component.
      Returns:
      the value of the saslServerCredentials record component
    • controls

      public List<Control> controls()
      Returns the value of the controls record component.
      Specified by:
      controls in interface ProtocolOp
      Returns:
      the value of the controls record component
    • cause

      public Throwable cause()
      Returns the value of the cause record component.
      Specified by:
      cause in interface Result
      Returns:
      the value of the cause record component
    • saslServer

      public SaslServer saslServer()
      Returns the value of the saslServer record component.
      Returns:
      the value of the saslServer record component