JsonWebKeyConverter.ConvertFromSecurityKey(SecurityKey) Method

Definition

Converts a SecurityKey into a JsonWebKey

public static Microsoft.IdentityModel.Tokens.JsonWebKey ConvertFromSecurityKey (Microsoft.IdentityModel.Tokens.SecurityKey key);
static member ConvertFromSecurityKey : Microsoft.IdentityModel.Tokens.SecurityKey -> Microsoft.IdentityModel.Tokens.JsonWebKey
Public Shared Function ConvertFromSecurityKey (key As SecurityKey) As JsonWebKey

Parameters

key
SecurityKey

a SecurityKey to convert.

Returns

a JsonWebKey

Exceptions

if keyis null.

if keyis not a supported type.

Remarks

Supports: RsaSecurityKey, X509SecurityKey and SymmetricSecurityKey.

Applies to