diff options
| author | mrw1593 <botahamec@outlook.com> | 2023-06-18 13:40:31 -0400 |
|---|---|---|
| committer | mrw1593 <botahamec@outlook.com> | 2023-06-18 13:40:31 -0400 |
| commit | 3feb8911aeff353238f6fdb8f71d4b970625b28d (patch) | |
| tree | 3450e35ce38921259839d57d570fc19b1c906751 /src/services/jwt.rs | |
| parent | ac7317226405fc90e8439a0c1bef91cecd539d02 (diff) | |
Implement the client credentials flow
Diffstat (limited to 'src/services/jwt.rs')
| -rw-r--r-- | src/services/jwt.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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<str>, client_id: Uuid, - auth_code_id: Uuid, token_type: TokenType, + auth_code_id: Option<Uuid>, redirect_uri: Option<Url>, } @@ -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<Uuid>, self_id: Url, client_id: Uuid, duration: Duration, |
