From 2b36d50c5918be9bd3096e5f468e0593c5232ecf Mon Sep 17 00:00:00 2001 From: Tobias Genannt Date: Fri, 16 May 2025 17:19:10 +0200 Subject: [PATCH] Add description to ID token (#1234) --- crates/common/src/auth/oauth/oidc.rs | 4 ++++ crates/http/src/auth/oauth/token.rs | 1 + 2 files changed, 5 insertions(+) diff --git a/crates/common/src/auth/oauth/oidc.rs b/crates/common/src/auth/oauth/oidc.rs index e3676e7f..fab9cc83 100644 --- a/crates/common/src/auth/oauth/oidc.rs +++ b/crates/common/src/auth/oauth/oidc.rs @@ -92,6 +92,10 @@ pub struct StandardClaims { #[serde(skip_serializing_if = "Option::is_none")] #[serde(default)] pub email: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + #[serde(default)] + pub description: Option, } impl Server { diff --git a/crates/http/src/auth/oauth/token.rs b/crates/http/src/auth/oauth/token.rs index 14f43bf1..6a09cf11 100644 --- a/crates/http/src/auth/oauth/token.rs +++ b/crates/http/src/auth/oauth/token.rs @@ -329,6 +329,7 @@ impl TokenHandler for Server { nonce, preferred_username: access_token.name.clone().into(), email: access_token.emails.first().cloned(), + description: access_token.description.clone().into(), }, ) { Ok(id_token) => Some(id_token),