mod config;
mod errors;
mod main;
mod types;
pub use config::SESSION_COOKIE_NAME; pub use errors::SessionError;
pub use types::{
AuthenticationStatus, CsrfHeaderVerified, CsrfToken, SessionCookie, SessionId, User, UserId,
};
pub use main::{
generate_page_session_token, get_csrf_token_from_session, get_user_and_csrf_token_from_session,
get_user_from_session, is_authenticated_basic, is_authenticated_basic_then_csrf,
is_authenticated_basic_then_user_and_csrf, is_authenticated_strict,
is_authenticated_strict_then_csrf, prepare_logout_response, verify_page_session_token,
};
#[cfg(test)]
pub(crate) use main::test_utils::{insert_test_session, insert_test_user};
pub(crate) use main::user_sessions::cleanup_stale_sessions;
pub(crate) use main::{
delete_session_from_store_by_session_id, get_session_id_from_headers, new_session_header,
};
pub(crate) fn init() {
let _ = *config::SESSION_COOKIE_NAME;
let _ = *config::SESSION_COOKIE_MAX_AGE;
let _ = *config::SESSION_CONFLICT_POLICY;
}