public class Gs2Header extends AbstractStringWritable
gs2-header = gs2-cbind-flag "," [ authzid ] ","
gs2-cbind-flag = ("p=" cb-name) / "n" / "y"
authzid = "a=" saslname
Current implementation does not support channel binding.
If p is used as the cbind flag, the cb-name value is not validated.Constructor and Description |
---|
Gs2Header(Gs2CbindFlag cbindFlag)
Construct and validates a Gs2Header with no authzid nor channel binding.
|
Gs2Header(Gs2CbindFlag cbindFlag,
String cbName)
Construct and validates a Gs2Header with no authzid.
|
Gs2Header(Gs2CbindFlag cbindFlag,
String cbName,
String authzid)
Construct and validates a Gs2Header.
|
Modifier and Type | Method and Description |
---|---|
Optional<String> |
getAuthzid() |
Gs2CbindFlag |
getChannelBindingFlag() |
Optional<String> |
getChannelBindingName() |
static Gs2Header |
parseFrom(String message)
Read a Gs2Header from a String.
|
StringBuffer |
writeTo(StringBuffer sb)
Write the class information to the given StringBuffer.
|
toString
public Gs2Header(Gs2CbindFlag cbindFlag, String cbName, String authzid) throws IllegalArgumentException
cbindFlag
- The channel binding flagcbName
- The channel-binding name. Should be not null iif channel binding is requiredauthzid
- The optional SASL authorization identityIllegalArgumentException
- If the channel binding flag and argument are invalidpublic Gs2Header(Gs2CbindFlag cbindFlag, String cbName) throws IllegalArgumentException
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(Gs2CbindFlag cbindFlag)
cbindFlag
- The channel binding flagIllegalArgumentException
- If the channel binding is supported (no cbname can be provided here)public Gs2CbindFlag getChannelBindingFlag()
public StringBuffer writeTo(StringBuffer sb)
StringWritable
sb
- Where to write the data.public static Gs2Header parseFrom(String message) throws IllegalArgumentException
message
- The String containing the Gs2HeaderIllegalArgumentException
- If the format/values of the String do not conform to a Gs2HeaderCopyright © 2017–2021. All rights reserved.