MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / decode_sasl_initial_response

Function decode_sasl_initial_response

src/pgwire/src/codec.rs:728–742  ·  view source on GitHub ↗
(mut buf: Cursor)

Source from the content-addressed store, hash-verified

726}
727
728pub fn decode_sasl_initial_response(mut buf: Cursor) -> Result<FrontendMessage, io::Error> {
729 let mechanism = buf.read_cstr()?;
730 let initial_resp_len = buf.read_i32()?;
731 if initial_resp_len < 0 {
732 // -1 means no response? We bail here
733 return Err(input_err("No initial response"));
734 }
735
736 let initial_response = decode_sasl_client_first_message(buf)?;
737 Ok(FrontendMessage::SASLInitialResponse {
738 gs2_header: initial_response.gs2_header.clone(),
739 mechanism: mechanism.to_owned(),
740 initial_response,
741 })
742}
743
744// proof = "p=" base64
745//

Callers 1

runFunction · 0.85

Calls 6

input_errFunction · 0.85
read_cstrMethod · 0.80
read_i32Method · 0.80
cloneMethod · 0.45
to_ownedMethod · 0.45

Tested by

no test coverage detected