Reimplemented access and refresh tokens.

This commit is contained in:
2026-10-18 13:21:48 +02:00
parent 4343959c74
commit 26999d690f
28 changed files with 1510 additions and 480 deletions
+3 -3
View File
@@ -5,7 +5,7 @@ use super::{
};
use crate::{
database::{self, Constraint, DatabaseError, dtos::UserAppSecretRow},
domain::UserAppSecret,
domain::{HashedSecret, UserAppSecret},
repository::DecodeError,
};
@@ -95,12 +95,12 @@ fn classify_upsert_error(error: DatabaseError) -> RepositoryError {
pub async fn verify<'e, E>(
executor: E,
app_id: Uuid,
secret_hash: &[u8],
secret_hash: &HashedSecret,
) -> Result<bool, RepositoryError>
where
E: sqlx::Executor<'e, Database = sqlx::Postgres>,
{
let is_valid = database::user_app_secrets::verify(executor, app_id, secret_hash).await?;
let is_valid = database::user_app_secrets::verify(executor, app_id, secret_hash.hash()).await?;
Ok(is_valid)
}