pub mod app_builder;
pub mod auth_flow;
pub mod config;
pub mod factor_impl;
pub mod session_auth;
pub use actix_session;
use serde::{de::DeserializeOwned, Serialize};
pub(in crate::session) const SESSION_KEY_USER: &str = "authfix__user";
pub(in crate::session) const SESSION_KEY_NEED_MFA: &str = "authfix__needs_mfa";
pub(in crate::session) const SESSION_KEY_LOGIN_VALID_UNTIL: &str = "authfix__login_valid_until";
pub trait AccountInfo {
fn user_identification(&self) -> String {
"user_identification is not implemented".to_owned()
}
fn is_user_disabled(&self) -> bool {
false
}
fn is_account_locked(&self) -> bool {
false
}
}
pub trait SessionUser: AccountInfo + Serialize + DeserializeOwned {}
impl<T> SessionUser for T where T: AccountInfo + Serialize + DeserializeOwned {}