Share via


JwtSecurityTokenHandler.ResolveTokenDecryptionKey Method

Definition

Returns a SecurityKey to use when decryption a JWE.

protected virtual Microsoft.IdentityModel.Tokens.SecurityKey ResolveTokenDecryptionKey (string token, System.IdentityModel.Tokens.Jwt.JwtSecurityToken jwtToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters);
abstract member ResolveTokenDecryptionKey : string * System.IdentityModel.Tokens.Jwt.JwtSecurityToken * Microsoft.IdentityModel.Tokens.TokenValidationParameters -> Microsoft.IdentityModel.Tokens.SecurityKey
override this.ResolveTokenDecryptionKey : string * System.IdentityModel.Tokens.Jwt.JwtSecurityToken * Microsoft.IdentityModel.Tokens.TokenValidationParameters -> Microsoft.IdentityModel.Tokens.SecurityKey
Protected Overridable Function ResolveTokenDecryptionKey (token As String, jwtToken As JwtSecurityToken, validationParameters As TokenValidationParameters) As SecurityKey

Parameters

token
String

The String the token that is being decrypted.

jwtToken
JwtSecurityToken

The JwtSecurityToken that is being decrypted.

validationParameters
TokenValidationParameters

The TokenValidationParameters to be used for validating the token.

Returns

Returns a SecurityKey to use for signature validation.

Remarks

If key fails to resolve, then null is returned

Applies to