Top Description Fields Constructors Methods
com.ongres.scram.common.message

public Class ClientFinalMessage

extends Object
implements StringWritable
Class Inheritance
All Implemented Interfaces
com.ongres.scram.common.util.StringWritable
Imports
com.ongres.scram.common.ScramAttributeValue, .ScramAttributes, .ScramStringFormatting, com.ongres.scram.common.gssapi.Gs2Header, com.ongres.scram.common.util.StringWritable, .StringWritableCsv

Constructs and parses client-final-messages. Formal syntax is: client-final-message-without-proof = channel-binding "," nonce ["," extensions] client-final-message = client-final-message-without-proof "," proof Note that extensions are not supported.
See Also
[RFC5802] Section 7

Field Summary

Modifier and TypeField and Description
private final String
private final String
private final byte[]

Constructor Summary

AccessConstructor and Description
public
ClientFinalMessage(Gs2Header
The GSS-API header
gs2Header
,
byte[]
If using channel binding, the channel binding data
cbindData
,
String
The nonce
nonce
,
byte[]
The bytes representing the computed client proof
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 TypeMethod and Description
private static String
generateCBind(Gs2Header gs2Header, byte[] cbindData)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public StringBuffer
writeTo(StringBuffer
Where to write the data.
sb
)

Implements com.ongres.scram.common.util.StringWritable.writeTo.

Write the class information to the given StringBuffer.
private static StringBuffer
private static StringBuffer
writeToWithoutProof(StringBuffer sb, Gs2Header gs2Header, byte[] cbindData, String nonce)

public static StringBuffer

Returns:

The String representation of the part of the message that excludes the proof
writeToWithoutProof
(Gs2Header
The GSS-API header
gs2Header
,
byte[]
The optional channel binding data
cbindData
,
String
The nonce
nonce
)

Returns a StringBuffer filled in with the formatted output of a client-first-message without the proof value.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

cbindback to summary
private final String cbind
nonceback to summary
private final String nonce
proofback to summary
private final byte[] proof

Constructor Detail

ClientFinalMessageback to summary
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:Gs2Header

The GSS-API header

cbindData:byte[]

If using channel binding, the channel binding data

nonce:String

The nonce

proof:byte[]

The bytes representing the computed client proof

Method Detail

generateCBindback to summary
private static String generateCBind(Gs2Header gs2Header, byte[] cbindData)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
writeToback to summary
public StringBuffer writeTo(StringBuffer sb)

Implements com.ongres.scram.common.util.StringWritable.writeTo.

Doc from com.ongres.scram.common.util.StringWritable.writeTo.

Write the class information to the given StringBuffer.

Parameters
sb:StringBuffer

Where to write the data.

Returns:StringBuffer

The same StringBuffer.

Annotations
@Override
writeToWithoutProofback to summary
private static StringBuffer writeToWithoutProof(StringBuffer sb, String cbind, String nonce)
writeToWithoutProofback to summary
private static StringBuffer writeToWithoutProof(StringBuffer sb, Gs2Header gs2Header, byte[] cbindData, String nonce)
writeToWithoutProofback to summary
public static StringBuffer writeToWithoutProof(Gs2Header gs2Header, byte[] cbindData, String nonce)

Returns a StringBuffer filled in with the formatted output of a client-first-message without the proof value. This is useful for computing the auth-message, used in turn to compute the proof.

Parameters
gs2Header:Gs2Header

The GSS-API header

cbindData:byte[]

The optional channel binding data

nonce:String

The nonce

Returns:StringBuffer

The String representation of the part of the message that excludes the proof