Hello,
I believe there's an error in the implementation.
|
// on decryption we get the public key from the EPK value see: https://datatracker.ietf.org/doc/html/rfc7518#appendix-C |
|
var ecdhKeyExchangeProvider = new EcdhKeyExchangeProvider( |
|
key as ECDsaSecurityKey, |
|
validationParameters.TokenDecryptionKey as ECDsaSecurityKey, |
|
jwtToken.Alg, |
The second argument of EcdhKeyExchangeProvider should be the public key taken from the epk in the token's header (as the comment said).
Hello,
I believe there's an error in the implementation.
azure-activedirectory-identitymodel-extensions-for-dotnet/src/Microsoft.IdentityModel.JsonWebTokens/JsonWebTokenHandler.cs
Lines 982 to 986 in 59ec62e
The second argument of
EcdhKeyExchangeProvidershould be the public key taken from theepkin the token's header (as the comment said).