Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Bug] JwtTokenDecryptionParameters's Alg and Enc is not set in JsonWebTokenHandler's token decryption, IDX10611 and IDX10619 shows null in messges #3003

@ciaozhang

Description

@ciaozhang

Where is the issue?

  • [x ] M.IM.JsonWebTokens

Repro
JwtSecurityTokenHandler DecryptToken inital the Alg and Enc
image
While JsonWebTokenHandler don't:
image

Expected behavior
Error message shouldshows the token's enc
Actual behavior
Microsoft.IdentityModel.Tokens.SecurityTokenDecryptionFailedException: IDX10619: Decryption failed. Algorithm: 'Null'. Either the Encryption Algorithm: 'Null' or none of the Security Keys are supported by the CryptoProviderFactory.

IDX10611: Decryption failed. Encryption is not supported for: Algorithm: 'Null', SecurityKey: '[PII of type 'Microsoft.IdentityModel.Tokens.X509SecurityKey' is hidden. For more details, see https://aka.ms/IdentityModel/PII.]'.

Metadata

Metadata

Assignees

Labels

BugProduct is not functioning as expectedP3If we have time in the milestone or it just is easy when addressing a more important issue

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions