Oidc.Server icon indicating copy to clipboard operation
Oidc.Server copied to clipboard

Fix array handling for claims with multiple values

Open kirill-abblix opened this issue 1 year ago • 1 comments

Summary of Changes

  • The MergeClaims method has been designed to correctly handle multiple claims of the same type by aggregating them into JSON arrays. This ensures that when a JWT contains multiple claims with the same type, they are represented as arrays in the payload, adhering to JWT standards.

  • The ToJsonNode method has been extended to support a broader range of ClaimValueTypes. This enhancement allows for accurate parsing and serialization of various claim value types into appropriate JsonNode representations.

Benefits

  • By correctly representing multiple claims of the same type as arrays, the JWTs generated are more compliant with JWT specifications.

  • These changes enhance compatibility with clients and services that expect claims to be structured in this manner, reducing potential integration issues.

  • The extended support for various ClaimValueTypes ensures that a wider range of claim data can be accurately processed and included in JWTs.

kirill-abblix avatar Apr 24 '25 09:04 kirill-abblix