pub trait ScramAuthClient: Debug {
// Required methods
fn get_username(&self) -> &str;
fn get_password(&self) -> &str;
// Provided methods
fn get_authzid(&self) -> Option<&str> { ... }
fn get_scram_keys(&self) -> Option<&ScramKey> { ... }
}
Expand description
A authentification backend which is behind the SCRAM lib. A program which uses this crate should implement this trait to its auth instance.
§Examples
ⓘ
impl ScramAuthClient for <ProgramStruct>
{
fn get_username(&self) -> &str
{
return &self.username;
}
fn get_password(&self) -> &str
{
return &self.password;
}
}
Required Methods§
Sourcefn get_username(&self) -> &str
fn get_username(&self) -> &str
This function must return plain text username
Sourcefn get_password(&self) -> &str
fn get_password(&self) -> &str
This function must return plain text password
Provided Methods§
Sourcefn get_authzid(&self) -> Option<&str>
fn get_authzid(&self) -> Option<&str>
This function may return the authzid a= (UTF-8).
Sourcefn get_scram_keys(&self) -> Option<&ScramKey>
fn get_scram_keys(&self) -> Option<&ScramKey>
This function returns a custom ScramKey instance if any other keys are used. If returns Option::None the default will be used.