diff --git a/crates/store/src/auth/toml_user_store.rs b/crates/store/src/auth/toml_user_store.rs index a790865..fc0516f 100644 --- a/crates/store/src/auth/toml_user_store.rs +++ b/crates/store/src/auth/toml_user_store.rs @@ -111,6 +111,7 @@ impl AuthenticationProvider for TomlPrincipalStore { principal.app_tokens.push(AppToken { name, token: token_hash, + created_at: Some(chrono::Utc::now()), }); self.save(principals.deref())?; Ok(()) diff --git a/crates/store/src/auth/user.rs b/crates/store/src/auth/user.rs index cde05f2..d53bcb6 100644 --- a/crates/store/src/auth/user.rs +++ b/crates/store/src/auth/user.rs @@ -3,6 +3,7 @@ use actix_web::{ http::{header, StatusCode}, FromRequest, HttpMessage, HttpResponse, ResponseError, }; +use chrono::{DateTime, Utc}; use derive_more::Display; use rustical_xml::ValueSerialize; use serde::{Deserialize, Serialize}; @@ -38,6 +39,7 @@ impl ValueSerialize for PrincipalType { pub struct AppToken { pub name: String, pub token: String, + pub created_at: Option>, } #[derive(Debug, Clone, Deserialize, Serialize)]