diff --git a/rauthy-models/src/lib.rs b/rauthy-models/src/lib.rs index 4cdf1330..b11d02ac 100644 --- a/rauthy-models/src/lib.rs +++ b/rauthy-models/src/lib.rs @@ -105,6 +105,7 @@ pub struct JwtAccessClaims { #[derive(Debug, Clone, Serialize, Deserialize)] pub struct JwtIdClaims { + pub sub: String, pub azp: String, pub typ: JwtType, pub amr: Vec, diff --git a/rauthy-service/src/auth.rs b/rauthy-service/src/auth.rs index 7cd8e96f..4a78b587 100644 --- a/rauthy-service/src/auth.rs +++ b/rauthy-service/src/auth.rs @@ -386,6 +386,7 @@ pub async fn build_id_token( }; let mut custom_claims = JwtIdClaims { + sub: user.id.clone(), azp: client.id.clone(), typ: JwtType::Id, amr: vec![amr],