<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="8.15.0" />

Microsoft.IdentityModel.Tokens.JsonWebKey

public class JsonWebKey : SecurityKey
Represents a JSON Web Key as defined in https://datatracker.ietf.org/doc/html/rfc7517.
public IDictionary<string, object> AdditionalData { get; }

When deserializing from JSON any properties that are not defined will be placed here.

public string Alg { get; set; }

Gets or sets the 'alg' (KeyType).

public string Crv { get; set; }

Gets or sets the 'crv' (ECC - Curve).

public string D { get; set; }

Gets or sets the 'd' (ECC - Private Key OR RSA - Private Exponent).

public string DP { get; set; }

Gets or sets the 'dp' (RSA - First Factor CRT Exponent).

public string DQ { get; set; }

Gets or sets the 'dq' (RSA - Second Factor CRT Exponent).

public string E { get; set; }

Gets or sets the 'e' (RSA - Exponent).

public bool HasPrivateKey { get; }

Gets a bool indicating if a private key exists.

public string K { get; set; }

Gets or sets the 'k' (Symmetric - Key Value).

public IList<string> KeyOps { get; }

Gets the 'key_ops' (Key Operations).

public string Kid { get; set; }

Gets or sets the 'kid' (Key ID)..

public string Kty { get; set; }

Gets or sets the 'kty' (Key Type).

public string N { get; set; }

Gets or sets the 'n' (RSA - Modulus).

public IList<string> Oth { get; }

Gets or sets the 'oth' (RSA - Other Primes Info).

public string P { get; set; }

Gets or sets the 'p' (RSA - First Prime Factor)..

public string Q { get; set; }

Gets or sets the 'q' (RSA - Second Prime Factor)..

public string QI { get; set; }

Gets or sets the 'qi' (RSA - First CRT Coefficient)..

public string Use { get; set; }

Gets or sets the 'use' (Public Key Use)..

public string X { get; set; }

Gets or sets the 'x' (ECC - X Coordinate)..

public IList<string> X5c { get; }

Gets the 'x5c' collection (X.509 Certificate Chain)..

public string X5t { get; set; }

Gets or sets the 'x5t' (X.509 Certificate SHA-1 thumbprint)..

public string X5tS256 { get; set; }

Gets or sets the 'x5t#S256' (X.509 Certificate SHA-256 thumbprint)..

public string X5u { get; set; }

Gets or sets the 'x5u' (X.509 URL)..

public string Y { get; set; }

Gets or sets the 'y' (ECC - Y Coordinate)..

public JsonWebKey()

Initializes an new instance of JsonWebKey.

public JsonWebKey(string json)

Initializes an new instance of JsonWebKey from a json string.

public static JsonWebKey Create(string json)

Returns a new instance of JsonWebKey.