Added user apps and token resources.

This commit is contained in:
2026-10-07 22:50:18 +02:00
parent 1f1f027368
commit 9038120734
47 changed files with 1940 additions and 29 deletions
+13
View File
@@ -0,0 +1,13 @@
use chrono::{DateTime, Utc};
use uuid::Uuid;
pub struct TokenRow {
pub id: Uuid,
pub app_id: Uuid,
pub access_token_hash: Vec<u8>,
pub refresh_token_hash: Vec<u8>,
pub access_expires_at: DateTime<Utc>,
pub refresh_expires_at: DateTime<Utc>,
pub revoked_at: Option<DateTime<Utc>>,
pub created_at: DateTime<Utc>,
}
+6
View File
@@ -0,0 +1,6 @@
use uuid::Uuid;
pub struct UserAppRow {
pub id: Uuid,
pub user_id: Uuid,
}
@@ -0,0 +1,10 @@
use chrono::{DateTime, Utc};
use uuid::Uuid;
pub struct UserAppSecretRow {
pub id: Uuid,
pub app_id: Uuid,
pub secret_hash: Vec<u8>,
pub expires_at: DateTime<Utc>,
pub created_at: DateTime<Utc>,
}