[Feature Request] Use System.Text.Json instead of Microsoft.IdentityModel.Json
See original GitHub issueIs your feature request related to a problem? Please describe. When creating token:
var token = JwtSecurityTokenHandler.CreateJwtSecurityToken(
issuer: issuer,
audience: audience,
signingCredentials: credential,
subject: Identity.Create("pwd", claims));
there is used TokenUtilities.GetClaimValueUsingValueType() method which uses internal types (JArray, JObject from Microsoft.IdentityModel.Json.Linq). Then the System.IdentityModel.Tokens.Jwt.JsonExtensions.Serializer is called where JwtPayload is serialized. But JwtPayload contains objects with internal types (JArray, JObject) and when using custom serializer there is problem to detect how to serialize this object.
So the internal serializer is not quite internal, because its types are required to be public to properly handle library.
Describe the solution you’d like Remove internal Microsoft.IdentityModel.Json serializer and use System.Text.Json.
Describe alternatives you’ve considered Make internal serializer public - accessible from outside of assembly.
Issue Analytics
- State:
- Created 6 months ago
- Reactions:1
- Comments:13 (12 by maintainers)
Top GitHub Comments
@kevinchalet i’ll work to get a commitment from the team.
Great, thanks for the information, @brentschmaltz! 😃