Adding token module #5

Merged
phoenix merged 2 commits from token into v0.3.0-migrate 2026-05-28 22:25:58 -04:00
2 changed files with 24 additions and 0 deletions
Showing only changes of commit 5bcdb870d3 - Show all commits
+1
View File
@@ -1,2 +1,3 @@
pub mod config;
pub mod contact;
pub mod token;
+23
View File
@@ -0,0 +1,23 @@
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct Claims {
pub user_id: uuid::Uuid,
pub role: String,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct LoginResult {
pub user_id: uuid::Uuid,
pub access_token: String,
pub token_type: String,
pub expires_in: i64,
pub issued_at: i64,
}
// Make alias for LoginResult for Login
// Alias for LoginResult
// Will be deprecated at some point
// type Login = LoginResult
type Login = LoginResult;