public final class ClientFirstMessage extends Object
gs2-header, a username
and a
nonce.
| client-first-message-bare | [reserved-mext ","] username "," nonce ["," extensions] |
| client-first-message | gs2-header client-first-message-bare |
| Constructor and Description |
|---|
ClientFirstMessage(@NotNull Gs2CbindFlag gs2CbindFlag,
@Nullable String cbindName,
@Nullable String authzid,
@NotNull String username,
@NotNull String clientNonce)
Constructs a client-first-message for the given parameters.
|
ClientFirstMessage(@NotNull Gs2Header gs2Header,
@NotNull String username,
@NotNull String clientNonce)
Constructs a client-first-message for the given user, nonce and gs2Header.
|
ClientFirstMessage(@NotNull String username,
@NotNull String clientNonce)
Constructs a client-first-message for the given parameters, with no channel binding nor
authzid.
|
| Modifier and Type | Method and Description |
|---|---|
@NotNull String |
getClientNonce()
Return the client nonce.
|
@NotNull Gs2Header |
getGs2Header()
Return the Gs2Header.
|
@NotNull String |
getUsername()
Return the username.
|
boolean |
isChannelBindingRequired()
Check to probe if gs2-cbind-flag is set to "p=".
|
static @NotNull ClientFirstMessage |
parseFrom(@NotNull String clientFirstMessage)
Construct a
ClientFirstMessage instance from a message (String). |
@NotNull String |
toString()
String representation of the SCRAM message.
|
public ClientFirstMessage(@NotNull
@NotNull Gs2Header gs2Header,
@NotNull
@NotNull String username,
@NotNull
@NotNull String clientNonce)
gs2Header - The GSS-API headerusername - The SCRAM usernameclientNonce - The nonce for this sessionIllegalArgumentException - If any of the arguments is null or emptypublic ClientFirstMessage(@NotNull
@NotNull Gs2CbindFlag gs2CbindFlag,
@Nullable
@Nullable String cbindName,
@Nullable
@Nullable String authzid,
@NotNull
@NotNull String username,
@NotNull
@NotNull String clientNonce)
gs2CbindFlag - The channel-binding flagauthzid - The optional authzidcbindName - The optional channel binding nameusername - The SCRAM userclientNonce - The nonce for this sessionIllegalArgumentException - If the flag, user or nonce are null or emptypublic ClientFirstMessage(@NotNull
@NotNull String username,
@NotNull
@NotNull String clientNonce)
username - The SCRAM userclientNonce - The nonce for this sessionIllegalArgumentException - If the user or nonce are null or emptypublic boolean isChannelBindingRequired()
@NotNull public @NotNull Gs2Header getGs2Header()
gs2-header@NotNull public @NotNull String getUsername()
"n=" saslname@NotNull public @NotNull String getClientNonce()
c-nonce@NotNull public static @NotNull ClientFirstMessage parseFrom(@NotNull @NotNull String clientFirstMessage) throws ScramParseException
ClientFirstMessage instance from a message (String).clientFirstMessage - The String representing the client-first-messageScramParseException - If the message is not a valid client-first-messageIllegalArgumentException - If the message is null or emptyCopyright © 2017–2025 OnGres, Inc. All rights reserved.