JsonWebKeyConverter.ConvertFromX509SecurityKey Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Exceptions
if key
is 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 key
is null.