diff options
author | rtkay123 <dev@kanjala.com> | 2025-07-25 18:37:32 +0200 |
---|---|---|
committer | rtkay123 <dev@kanjala.com> | 2025-07-25 18:37:32 +0200 |
commit | 3406efe921e877878d8ba656651e0d90382586ae (patch) | |
tree | 72538576df711385490d12a4ef9fed0781ce9de2 /crates/auth/src/server/routes/authorised.rs | |
parent | 3831e5a42ab4e21f116537c5251582245de37f0b (diff) | |
download | sellershut-3406efe921e877878d8ba656651e0d90382586ae.tar.bz2 sellershut-3406efe921e877878d8ba656651e0d90382586ae.zip |
feat(auth): validate token
Diffstat (limited to 'crates/auth/src/server/routes/authorised.rs')
-rw-r--r-- | crates/auth/src/server/routes/authorised.rs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/crates/auth/src/server/routes/authorised.rs b/crates/auth/src/server/routes/authorised.rs index 27f02bc..50fcfc8 100644 --- a/crates/auth/src/server/routes/authorised.rs +++ b/crates/auth/src/server/routes/authorised.rs @@ -19,6 +19,7 @@ use tower_sessions::{ use uuid::Uuid; use crate::{ + auth::Claims, error::AppError, server::{ OAUTH_CSRF_COOKIE, csrf_token_validation::csrf_token_validation_workflow, routes::Provider, @@ -55,16 +56,6 @@ struct DbUser { const SESSION_COOKIE: &str = "info"; const SESSION_DATA_KEY: &str = "data"; -#[derive(Debug, Serialize, Deserialize)] -struct Claims { - iss: String, - sub: Uuid, - exp: i64, - iat: i64, - sid: String, - aud: String, -} - pub async fn login_authorised( Query(query): Query<AuthRequest>, State(state): State<AppHandle>, |