Skip to content

Commit

Permalink
Merge pull request #12 from sebadob/user-id-in-id-token
Browse files Browse the repository at this point in the history
add user uid to jwt id `sub` claim
  • Loading branch information
sebadob authored Aug 12, 2023
2 parents d0a71d6 + 5353bf8 commit 6b0a8b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions rauthy-models/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>,
Expand Down
1 change: 1 addition & 0 deletions rauthy-service/src/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit 6b0a8b0

Please sign in to comment.