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

Method authenticate

src/adapter/src/client.rs:164–177  ·  view source on GitHub ↗

Used by [mz_auth::AuthenticatorKind::Password] to verify the provided user's password against the stored credentials in the catalog.

(
        &self,
        user: &String,
        password: &Password,
    )

Source from the content-addressed store, hash-verified

162 /// to verify the provided user's password against the
163 /// stored credentials in the catalog.
164 pub async fn authenticate(
165 &self,
166 user: &String,
167 password: &Password,
168 ) -> Result<Authenticated, AdapterError> {
169 let (tx, rx) = oneshot::channel();
170 self.send(Command::AuthenticatePassword {
171 role_name: user.to_string(),
172 password: Some(password.clone()),
173 tx,
174 });
175 rx.await.expect("sender dropped")?;
176 Ok(Authenticated)
177 }
178
179 /// Used by [mz_auth::AuthenticatorKind::Sasl] for SASL-SCRAM authentication.
180 /// This is used prior to [Client::verify_sasl_proof].

Callers 5

runFunction · 0.45
resolveMethod · 0.45
handle_loginFunction · 0.45
authFunction · 0.45

Calls 5

channelFunction · 0.85
expectMethod · 0.80
sendMethod · 0.45
to_stringMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected