Skip to main content

UserpassAuthOperations

Trait UserpassAuthOperations 

Source
pub trait UserpassAuthOperations: Send + Sync {
    // Required methods
    fn login(
        &self,
        username: &str,
        password: &SecretString,
    ) -> impl Future<Output = Result<AuthInfo, VaultError>> + Send;
    fn create_user(
        &self,
        username: &str,
        params: &UserpassUserRequest,
    ) -> impl Future<Output = Result<(), VaultError>> + Send;
    fn read_user(
        &self,
        username: &str,
    ) -> impl Future<Output = Result<UserpassUserInfo, VaultError>> + Send;
    fn delete_user(
        &self,
        username: &str,
    ) -> impl Future<Output = Result<(), VaultError>> + Send;
    fn list_users(
        &self,
    ) -> impl Future<Output = Result<Vec<String>, VaultError>> + Send;
    fn update_password(
        &self,
        username: &str,
        password: &SecretString,
    ) -> impl Future<Output = Result<(), VaultError>> + Send;
}

Required Methods§

Source

fn login( &self, username: &str, password: &SecretString, ) -> impl Future<Output = Result<AuthInfo, VaultError>> + Send

Source

fn create_user( &self, username: &str, params: &UserpassUserRequest, ) -> impl Future<Output = Result<(), VaultError>> + Send

Source

fn read_user( &self, username: &str, ) -> impl Future<Output = Result<UserpassUserInfo, VaultError>> + Send

Source

fn delete_user( &self, username: &str, ) -> impl Future<Output = Result<(), VaultError>> + Send

Source

fn list_users( &self, ) -> impl Future<Output = Result<Vec<String>, VaultError>> + Send

Source

fn update_password( &self, username: &str, password: &SecretString, ) -> impl Future<Output = Result<(), VaultError>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§