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

Microsoft.IdentityModel.Tokens.X509SecurityKey

public X509Certificate2 Certificate { get; }

Gets the X509Certificate2.

Returns the private key from the X509SecurityKey.

Gets the public key from the X509SecurityKey.

public string X5t { get; }

Gets the X5t of this X509SecurityKey.

public X509SecurityKey(X509Certificate2 certificate)

Instantiates a X509SecurityKey using a X509Certificate2

public X509SecurityKey(X509Certificate2 certificate, string keyId)

Instantiates a X509SecurityKey using a X509Certificate2.