diff options
Diffstat (limited to 'src/login/mod.rs')
-rw-r--r-- | src/login/mod.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/login/mod.rs b/src/login/mod.rs new file mode 100644 index 0000000..5637e8a --- /dev/null +++ b/src/login/mod.rs @@ -0,0 +1,20 @@ +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>; +} |