tsk-71: Add token expiration checks #78

Merged
phoenix merged 9 commits from tsk-71 into next-v0.8 2025-10-19 02:18:29 +00:00
Showing only changes of commit 380d28a86e - Show all commits

View File

@@ -2,7 +2,7 @@ use std::default::Default;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, Deserialize, Serialize, utoipa::ToSchema)] #[derive(Clone, Debug, Default, Deserialize, Serialize, utoipa::ToSchema)]
pub struct LoginResult { pub struct LoginResult {
pub id: uuid::Uuid, pub id: uuid::Uuid,
pub username: String, pub username: String,
@@ -12,17 +12,6 @@ pub struct LoginResult {
pub expiration: i64, pub expiration: i64,
} }
impl Default for LoginResult {
fn default() -> Self {
LoginResult {
id: uuid::Uuid::nil(),
username: String::new(),
token: String::new(),
token_type: String::new(),
expiration: -1,
}
}
}
impl LoginResult { impl LoginResult {
pub fn _to_json(&self) -> Result<String, serde_json::Error> { pub fn _to_json(&self) -> Result<String, serde_json::Error> {