Skip to content

Commit

Permalink
Don't include the OpenIddict private claims in the merged principal
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinchalet committed Feb 20, 2024
1 parent 45515d1 commit dde49a8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/OpenIddict.Client/OpenIddictClientHandlers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4061,6 +4061,12 @@ ClaimsPrincipal CreateMergedPrincipal(params ClaimsPrincipal?[] principals)
continue;
}

// Ignore the OpenIddict private claims.
if (claim.Type.StartsWith(Claims.Prefixes.Private, StringComparison.OrdinalIgnoreCase))
{
continue;
}

identity.AddClaim(claim);
}
}
Expand Down

0 comments on commit dde49a8

Please sign in to comment.