Package com.ongres.scram.common
Class ClientFinalMessage
java.lang.Object
com.ongres.scram.common.StringWritable
com.ongres.scram.common.AbstractScramMessage
com.ongres.scram.common.ClientFinalMessage
Constructs and parses client-final-messages.
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:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionClientFinalMessage
(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. -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
checkChannelBinding
(Gs2Header gs2Header, byte[] cbindData) private static @NotNull String
generateCBindInput
(@NotNull Gs2Header gs2Header, byte @Nullable [] cbindData) Return the channel-binding "c=" base64 encoding of cbind-input.getNonce()
Return the nonce.byte[]
getProof()
Return the proof.(package private) static StringBuilder
withoutProof
(StringBuilder sb, Gs2Header gs2Header, byte[] cbindData, String nonce) (package private) StringBuilder
writeTo
(StringBuilder sb) Write the class information to the given StringBuffer.private StringBuilder
writeToWithoutProof
(@NotNull StringBuilder sb) Methods inherited from class com.ongres.scram.common.AbstractScramMessage
toString
-
Field Details
-
cbindInput
channel-binding = "c=" base64 encoding of cbind-input. -
nonce
nonce = "r=" c-nonce [s-nonce]. Second part provided by server. -
proof
private final byte[] proofproof = "p=" base64.
-
-
Constructor Details
-
ClientFinalMessage
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 headercbindData
- If using channel binding, the channel binding datanonce
- The nonceproof
- The bytes representing the computed client proof
-
-
Method Details
-
getCbindInput
Return the channel-binding "c=" base64 encoding of cbind-input.- Returns:
- the
channel-binding
-
getNonce
Return the nonce.- Returns:
- the
nonce
-
getProof
public byte[] getProof()Return the proof.- Returns:
- the
proof
-
checkChannelBinding
-
generateCBindInput
-
writeToWithoutProof
-
withoutProof
static StringBuilder withoutProof(StringBuilder sb, Gs2Header gs2Header, byte[] cbindData, String nonce) -
writeTo
Description copied from class:StringWritable
Write the class information to the given StringBuffer.- Specified by:
writeTo
in classStringWritable
- Parameters:
sb
- Where to write the data.- Returns:
- The same StringBuffer.
-