mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-09-25 22:29:45 +00:00
Upgrade user tokens system
This commit is contained in:
@@ -9,10 +9,10 @@ use std::time::Duration;
|
||||
/// The name of the tables
|
||||
pub mod database_tables_names {
|
||||
/// API services tokens table
|
||||
pub const SERVICES_TABLES: &str = "comunic_api_services_tokens";
|
||||
pub const CLIENTS_TABLE: &str = "comunic_clients";
|
||||
|
||||
/// User access tokens table
|
||||
pub const USER_ACCESS_TOKENS_TABLE: &str = "comunic_api_users_tokens";
|
||||
pub const USER_ACCESS_TOKENS_TABLE: &str = "comunic_user_access_tokens";
|
||||
|
||||
/// User table
|
||||
pub const USERS_TABLE: &str = "utilisateurs";
|
||||
@@ -108,4 +108,7 @@ pub const PASSWORD_MIN_LENGTH: usize = 3;
|
||||
pub const SUPPORTED_LANGUAGES: &'static [&'static str] = &["en", "fr"];
|
||||
|
||||
/// Interval at which last active time of user should be recorded
|
||||
pub const USER_LAST_ACTIVITY_REFRESH: Duration = Duration::from_secs(60);
|
||||
pub const USER_LAST_ACTIVITY_REFRESH: Duration = Duration::from_secs(60);
|
||||
|
||||
/// Interval at which last activity of an access token should be recorded
|
||||
pub const USER_ACCESS_TOKEN_ACTIVITY_REFRESH: Duration = Duration::from_secs(60*60);
|
Reference in New Issue
Block a user