aboutsummaryrefslogblamecommitdiff
path: root/src/login/mod.rs
blob: 5637e8a70a44416e12a05f01059063e07642063c (plain) (tree)



















                                                                                 
pub mod ldap_provider;
pub mod static_provider;

use anyhow::Result;
use async_trait::async_trait;

use crate::cryptoblob::Key as SymmetricKey;

#[derive(Clone, Debug)]
pub struct Credentials {
    pub aws_access_key_id: String,
    pub aws_secret_access_key: String,
    pub bucket: String,
    pub master_key: SymmetricKey,
}

#[async_trait]
pub trait LoginProvider {
    async fn login(&self, username: &str, password: &str) -> Result<Credentials>;
}