public final class Gs2Header extends Object
| gs2-cbind-flag | ("p=" cb-name) / "n" / "y" ;; "n" -> client doesn't support channel binding. ;; "y" -> client does support channel binding ;; but thinks the server does not. ;; "p" -> client requires channel binding. ;; The selected channel binding follows "p=". |
| gs2-header | gs2-cbind-flag "," [ authzid ] "," ;; GS2 header for SCRAM ;; (the actual GS2 header includes an optional ;; flag to indicate that the GSS mechanism is not ;; "standard", but since SCRAM is "standard", we ;; don't include that flag). |
| authzid | "a=" saslname |
| Constructor and Description |
|---|
Gs2Header(@NotNull Gs2CbindFlag cbindFlag)
Construct and validates a Gs2Header with no authzid nor channel binding.
|
Gs2Header(@NotNull Gs2CbindFlag cbindFlag,
@Nullable String cbName)
Construct and validates a Gs2Header with no authzid.
|
Gs2Header(@NotNull Gs2CbindFlag cbindFlag,
@Nullable String cbName,
@Nullable String authzid)
Construct and validates a Gs2Header.
|
| Modifier and Type | Method and Description |
|---|---|
@Nullable String |
getAuthzid()
Return the authzid.
|
@NotNull Gs2CbindFlag |
getChannelBindingFlag()
Return the channel binding flag.
|
@Nullable String |
getChannelBindingName()
Return the channel binding type.
|
static @NotNull Gs2Header |
parseFrom(@NotNull String message)
Read a Gs2Header from a String.
|
public Gs2Header(@NotNull
@NotNull Gs2CbindFlag cbindFlag,
@Nullable
@Nullable String cbName,
@Nullable
@Nullable String authzid)
cbindFlag - The channel binding flagcbName - The channel-binding name. Should be not null if channel binding is requiredauthzid - The optional SASL authorization identityIllegalArgumentException - If the channel binding flag and argument are invalidpublic Gs2Header(@NotNull
@NotNull Gs2CbindFlag cbindFlag,
@Nullable
@Nullable String cbName)
cbindFlag - The channel binding flagcbName - The channel-binding name. Should be not null iif channel binding is requiredIllegalArgumentException - If the channel binding flag and argument are invalidpublic Gs2Header(@NotNull
@NotNull Gs2CbindFlag cbindFlag)
cbindFlag - The channel binding flagIllegalArgumentException - If the channel binding is supported (no cbname can be provided
here)@NotNull public @NotNull Gs2CbindFlag getChannelBindingFlag()
gs2-cbind-flag@Nullable public @Nullable String getChannelBindingName()
cb-name@Nullable public @Nullable String getAuthzid()
"a=" saslname@NotNull public static @NotNull Gs2Header parseFrom(@NotNull @NotNull String message)
message - The String containing the Gs2HeaderIllegalArgumentException - If the format/values of the String do not conform to a
Gs2HeaderCopyright © 2017–2025 OnGres, Inc. All rights reserved.