    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94

    mod config;
    mod cli;
    mod filestore;
    mod session;
    mod userdata;
    mod usernotifydata;
    mod entries;
    mod user;
    mod userstore;
    mod userstatus;
    #[cfg(feature = "authstore")]
    mod authz;
    mod appdbs;
    mod req_headermap;
    mod req_handler;
    mod user_id;
    mod user_action;
    mod user_role;
    mod tracedata;
    mod local;
    mod mailer;
    mod totp_mode;
    mod totp_algorithm;

    pub(crate) use appdbs::AppDBs;
    pub(crate) use session::{
        SessionStoreDB,
        AuthState,
    //     Random,
    };
    pub(crate) use filestore::FileStore;
    pub(crate) use user::User;
    pub(crate) use userstore::UserStore;
    pub(crate) use userstatus::UserStatus;
    pub(crate) use userdata::{
        UserData,
        UserLogin,
        UserItem,
        UserInvitation,
    };
    pub(crate) use usernotifydata::UserNotifyData;
    #[cfg(feature = "authstore")]
    pub(crate) use authz::AuthStore;
    pub(crate) use user_role::UserRole;
    pub(crate) use config::{ServPath,Config};
    pub(crate) use cli::parse_args;
    pub(crate) use req_handler::ReqHandler;
    pub(crate) use req_headermap::ReqHeaderMap;
    pub(crate) use user_id::UserId;
    pub(crate) use user_action::UserAction;
    pub(crate) use tracedata::TraceData;
    pub(crate) use local::Local;
    pub(crate) use mailer::MailMessage;

    pub(crate) use totp_algorithm::{TotpAlgorithm,deserialize_totp_algorithm};
    pub(crate) use totp_mode::{TotpMode, deserialize_totp_mode};

    pub const TOKEN_KEY_VALUE: &str = "tii-cl";
    pub const TOKEN_AUTH_VALUE: &str = "tii-cl-token";
    pub const CLAIM_UID: &str = "uid";
    pub const CLAIM_AUTH: &str = "auth";
    pub const CLAIM_APP_KEY: &str = "app_key";
    pub const USER_DATA: &str = "user_data";
    pub const BEARER: &str = "Bearer";
    pub const USER_AGENT: &str = "user-agent";
    pub const FILE_SCHEME: &str = "file:///";

    pub const SESSION_ID: &str = "sid";
    pub const ACCEPT_LANGUAGE: &str = "accept-language";
    pub const X_INTERNAL: &str = "x-internal";
    pub const X_REAL_IP: &str = "x-real-ip";
    pub const X_FORWARDED_FOR: &str = "x-forwarded-for";
    pub const AUTHORIZATION: &str = "authorization";
    pub const REFERER: &str = "referer";
    /*
    pub const SID: &str = "sid";
    pub const UI_SETTINGS_FILE: &str = "ui_settings.json";
    */
    #[allow(dead_code)]
    pub const LOGS_SESSION_COOKIE_NAME: &str = "tiicl_session";
    #[allow(dead_code)]
    pub const SID_REQUESTS_FILE: &str = "sid_requests.json";
    #[allow(dead_code)]
    pub const SID_SETTINGS_FILE: &str = "sid_settings.json";
    #[allow(dead_code)]
    pub const SID_TRACE_FILE: &str = "sid_trace.json";
    #[allow(dead_code)]
    pub const HELP_URI: &str = "help";
    #[allow(dead_code)]
    pub const HELP_EXT: &str = "_help";
    #[allow(dead_code)]
    pub const TEMPLATE_EXT: &str = "txt";
    #[allow(dead_code)]
    pub const LOG_REQ: &str = "logreq";