Share via


JsonWebKeyConverter.ConvertFromX509SecurityKey Method

Definition

Overloads

ConvertFromX509SecurityKey(X509SecurityKey)

Converts a X509SecurityKey into a JsonWebKey

ConvertFromX509SecurityKey(X509SecurityKey, Boolean)

Converts a X509SecurityKey into a JsonWebKey.

ConvertFromX509SecurityKey(X509SecurityKey)

Converts a X509SecurityKey into a JsonWebKey

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

Parameters

key
X509SecurityKey

a X509SecurityKey to convert.

Returns

a JsonWebKey

Exceptions

if keyis null.

Applies to

ConvertFromX509SecurityKey(X509SecurityKey, Boolean)

Converts a X509SecurityKey into a JsonWebKey.

public static Microsoft.IdentityModel.Tokens.JsonWebKey ConvertFromX509SecurityKey (Microsoft.IdentityModel.Tokens.X509SecurityKey key, bool representAsRsaKey);
static member ConvertFromX509SecurityKey : Microsoft.IdentityModel.Tokens.X509SecurityKey * bool -> Microsoft.IdentityModel.Tokens.JsonWebKey
Public Shared Function ConvertFromX509SecurityKey (key As X509SecurityKey, representAsRsaKey As Boolean) As JsonWebKey

Parameters

key
X509SecurityKey

a X509SecurityKey to convert.

representAsRsaKey
Boolean

true to represent the key as an RsaSecurityKey, false to represent the key as an X509SecurityKey, using the "x5c" parameter.

Returns

a JsonWebKey.

Exceptions

if keyis null.

Applies to