From 3feb8911aeff353238f6fdb8f71d4b970625b28d Mon Sep 17 00:00:00 2001 From: mrw1593 Date: Sun, 18 Jun 2023 13:40:31 -0400 Subject: Implement the client credentials flow --- src/services/jwt.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/services/jwt.rs') diff --git a/src/services/jwt.rs b/src/services/jwt.rs index 822101f..c86fb01 100644 --- a/src/services/jwt.rs +++ b/src/services/jwt.rs @@ -30,8 +30,8 @@ pub struct Claims { jti: Uuid, scope: Box, client_id: Uuid, - auth_code_id: Uuid, token_type: TokenType, + auth_code_id: Option, redirect_uri: Option, } @@ -67,7 +67,7 @@ impl Claims { jti: id, scope: scopes.into(), client_id, - auth_code_id: id, + auth_code_id: Some(id), token_type: TokenType::Authorization, redirect_uri: Some(redirect_uri.clone()), }) @@ -75,7 +75,7 @@ impl Claims { pub async fn access_token<'c>( db: &MySqlPool, - auth_code_id: Uuid, + auth_code_id: Option, self_id: Url, client_id: Uuid, duration: Duration, -- cgit v1.2.3