Fix array handling for claims with multiple values
Summary of Changes
-
The
MergeClaimsmethod 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
ToJsonNodemethod has been extended to support a broader range ofClaimValueTypes. This enhancement allows for accurate parsing and serialization of various claim value types into appropriateJsonNoderepresentations.
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
ClaimValueTypesensures that a wider range of claim data can be accurately processed and included in JWTs.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code