diff --git a/src/NetDevPack.Security.Jwt.Core/Model/Key.cs b/src/NetDevPack.Security.Jwt.Core/Model/Key.cs index b6934a3..a6dc0c7 100644 --- a/src/NetDevPack.Security.Jwt.Core/Model/Key.cs +++ b/src/NetDevPack.Security.Jwt.Core/Model/Key.cs @@ -28,7 +28,10 @@ public KeyMaterial(CryptographicKey cryptographicKey) public JsonWebKey GetSecurityKey() { - return JsonSerializer.Deserialize(Parameters); + //problem here are default Serializer options. If these options don't have the property PropertyNameCaseInsensitive = true, the deserialization will fail. + //var jsonWebKey = JsonSerializer.Deserialize(Parameters); + var jsonWebKey = JsonWebKey.Create(Parameters); + return jsonWebKey; } public void Revoke(string reason=default)