Class ClientFinalMessage

java.lang.Object
com.ongres.scram.common.ClientFinalMessage

public final class ClientFinalMessage extends Object
Constructs and parses client-final-messages.
Formal Syntax:
cbind-input gs2-header [ cbind-data ]
;; cbind-data MUST be present for
;; gs2-cbind-flag of "p" and MUST be absent
;; for "y" or "n".
channel-binding "c=" base64
;; base64 encoding of cbind-input.
client-final-message-without-proof channel-binding "," nonce ["," extensions]
client-final-message client-final-message-without-proof "," proof
See Also:
Implementation Note:
extensions are not supported.
  • Constructor Details

    • ClientFinalMessage

      public ClientFinalMessage(Gs2Header gs2Header, byte[] cbindData, String nonce, byte[] proof)
      Constructus a client-final-message with the provided gs2Header (the same one used in the client-first-message), optionally the channel binding data, and the nonce. This method is intended to be used by SCRAM clients, and not to be constructed directly.
      Parameters:
      gs2Header - The GSS-API header
      cbindData - If using channel binding, the channel binding data
      nonce - The nonce
      proof - The bytes representing the computed client proof
  • Method Details

    • getCbindInput

      public String getCbindInput()
      Return the channel-binding "c=" base64 encoding of cbind-input.
      Returns:
      the channel-binding
    • getNonce

      public String getNonce()
      Return the nonce.
      Returns:
      the nonce
    • getProof

      public byte[] getProof()
      Return the proof.
      Returns:
      the proof
    • toString

      @NotNull public final @NotNull String toString()
      String representation of the SCRAM message.
      Overrides:
      toString in class Object