Added initial authorization layer.

This commit is contained in:
2026-10-09 17:22:46 +02:00
parent 7fb3abc93d
commit 1f6de34e5b
16 changed files with 184 additions and 64 deletions
+4
View File
@@ -60,6 +60,8 @@ where
fn decode(token: TokenRow) -> Result<Token, RepositoryError> {
Ok(Token {
id: token.id,
user_id: token.user_id,
user_app_id: token.user_app_id,
access_token_hash: token.access_token_hash,
refresh_token_hash: token.refresh_token_hash,
access_expires_at: token.access_expires_at,
@@ -73,6 +75,8 @@ fn decode(token: TokenRow) -> Result<Token, RepositoryError> {
fn encode(token: Token) -> TokenRow {
TokenRow {
id: token.id,
user_id: token.user_id,
user_app_id: token.user_app_id,
access_token_hash: token.access_token_hash,
refresh_token_hash: token.refresh_token_hash,
access_expires_at: token.access_expires_at,