pub fn parse_client_initial_response(
bytes: &[u8],
) -> Result<ClientInitialResponse, AuthError>Expand description
Parse the SASL/OAUTHBEARER client initial response (RFC 7628 §3.1).
Wire shape (^A = \x01):
gs2-header ^A auth=Bearer <token> [^A key=value ...] ^A ^A
The GS2 header is gs2-cb-flag "," [authzid] "," — for OAUTHBEARER over a
TLS / plaintext listener the channel-binding flag is n (none). We accept
n / y and ignore everything else in the header except the authzid.
Non-auth kvpairs (host / port / extensions) are ignored.
§Errors
AuthError::MalformedMessage when the GS2 header or the auth=Bearer
kvpair is missing or malformed.