pub async fn login_with_password_str(
        &self,
        username: &str,
        password: &str,
        previous_file: Option<ClientFile>,
    ) -> Result<PasswordResult, bonsaidb_core::Error> {
        let (login, request) = ClientLogin::login(
            ClientConfig::new(password_config(), None)?,
            previous_file,
            password,
        )?;
        let response = self.login_with_password(username, request).await?;
        let (file, login_finalization, export_key) = login.finish(response)?;
        self.finish_login_with_password(login_finalization).await?;
        Ok(PasswordResult { file, export_key })
    }
/// Authenticates as a user with a provided password. The password provided
/// will never leave the machine that is calling this function. Internally
/// uses `login_with_password` and `finish_login_with_password` in
/// conjunction with `custodian-password`.
Authenticates as a user with a provided password. The password provided
will never leave the machine that is calling this function.
Authenticates as a user with a provided password . The password provided will never leave the machine that is calling this function .
pub async fn login_with_password_str(
        &self,
        username: &str,
        password: &str,
        previous_file: Option<ClientFile>,
    ) -> Result<PasswordResult, bonsaidb_core::Error> {
        let (login, request) = ClientLogin::login(
            ClientConfig::new(password_config(), None)?,
            previous_file,
            password,
        )?;
        let response = self.login_with_password(username, request).await?;
        let (file, login_finalization, export_key) = login.finish(response)?;
        self.finish_login_with_password(login_finalization).await?;
        Ok(PasswordResult { file, export_key })
    }
pub async fn login_with_password_str ( & self , username : & str , password : & str , previous_file : Option < ClientFile > , ) -> Result < PasswordResult , bonsaidb_core :: Error > { let ( login , request ) = ClientLogin :: login ( ClientConfig :: new ( password_config ( ) , None ) ? , previous_file , password , ) ? ; let response = self . login_with_password ( username , request ) . await ? ; let ( file , login_finalization , export_key ) = login . finish ( response ) ? ; self . finish_login_with_password ( login_finalization ) . await ? ; Ok ( PasswordResult { file , export_key } ) }
Authenticates as a user with a provided password.
Authenticates as a user with a provided password .
&self
username
&str
password
&str
previous_file
Option<ClientFile>
&self
username
&str
password
&str
previous_file
Option<ClientFile>