diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2022-06-17 18:39:36 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2022-06-17 18:39:36 +0200 |
commit | 5dd5ae8bcd6f88703bc483d7f8d5882fefad4e7e (patch) | |
tree | 312708a97fcfcd273481f41b8bd6c878030573f4 /src/login/mod.rs | |
parent | 41f1b02171cee36706d30cf24329ff12780d47fd (diff) | |
download | aerogramme-5dd5ae8bcd6f88703bc483d7f8d5882fefad4e7e.tar.gz aerogramme-5dd5ae8bcd6f88703bc483d7f8d5882fefad4e7e.zip |
WIP Refactor, code is broken
Diffstat (limited to 'src/login/mod.rs')
-rw-r--r-- | src/login/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/login/mod.rs b/src/login/mod.rs index c0e9032..1d5d634 100644 --- a/src/login/mod.rs +++ b/src/login/mod.rs @@ -2,6 +2,7 @@ pub mod ldap_provider; pub mod static_provider; use std::collections::BTreeMap; +use std::sync::Arc; use anyhow::{anyhow, bail, Context, Result}; use async_trait::async_trait; @@ -29,6 +30,10 @@ pub trait LoginProvider { async fn public_login(&self, email: &str) -> Result<PublicCredentials>; } +/// ArcLoginProvider is simply an alias on a structure that is used +/// in many places in the code +pub type ArcLoginProvider = Arc<dyn LoginProvider + Send + Sync>; + /// The struct Credentials represent all of the necessary information to interact /// with a user account's data after they are logged in. #[derive(Clone, Debug)] |