aboutsummaryrefslogtreecommitdiff
path: root/src/login/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/login/mod.rs')
-rw-r--r--src/login/mod.rs5
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)]