SigningCredentials Constructors

Definition

Overloads

SigningCredentials(X509Certificate2)

Initializes a new instance of the SigningCredentials class.

SigningCredentials(SecurityKey, String)

Initializes a new instance of the SigningCredentials class.

SigningCredentials(X509Certificate2, String)

Initializes a new instance of the SigningCredentials class.

SigningCredentials(SecurityKey, String, String)

Initializes a new instance of the SigningCredentials class.

SigningCredentials(X509Certificate2)

Initializes a new instance of the SigningCredentials class.

protected SigningCredentials (System.Security.Cryptography.X509Certificates.X509Certificate2 certificate);
new Microsoft.IdentityModel.Tokens.SigningCredentials : System.Security.Cryptography.X509Certificates.X509Certificate2 -> Microsoft.IdentityModel.Tokens.SigningCredentials
Protected Sub New (certificate As X509Certificate2)

Parameters

certificate
System.Security.Cryptography.X509Certificates.X509Certificate2

System.Security.Cryptography.X509Certificates.X509Certificate2 that will be used for signing.

Exceptions

System.ArgumentNullException

if 'algorithm' is null or empty.

Remarks

Algorithm will be set to RsaSha256. the 'digest method' if needed may be implied from the algorithm. For example RsaSha256 implies Sha256.

Applies to

SigningCredentials(SecurityKey, String)

Initializes a new instance of the SigningCredentials class.

public SigningCredentials (Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm);
new Microsoft.IdentityModel.Tokens.SigningCredentials : Microsoft.IdentityModel.Tokens.SecurityKey * string -> Microsoft.IdentityModel.Tokens.SigningCredentials
Public Sub New (key As SecurityKey, algorithm As String)

Parameters

algorithm
System.String

The signature algorithm to apply.

Exceptions

System.ArgumentNullException

if 'algorithm' is null or empty.

Remarks

the 'digest method' if needed may be implied from the algorithm. For example HmacSha256Signature implies Sha256.

Applies to

SigningCredentials(X509Certificate2, String)

Initializes a new instance of the SigningCredentials class.

protected SigningCredentials (System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, string algorithm);
new Microsoft.IdentityModel.Tokens.SigningCredentials : System.Security.Cryptography.X509Certificates.X509Certificate2 * string -> Microsoft.IdentityModel.Tokens.SigningCredentials
Protected Sub New (certificate As X509Certificate2, algorithm As String)

Parameters

certificate
System.Security.Cryptography.X509Certificates.X509Certificate2

System.Security.Cryptography.X509Certificates.X509Certificate2 that will be used for signing.

algorithm
System.String

The signature algorithm to apply.

Exceptions

System.ArgumentNullException

if 'algorithm' is null or empty.

Remarks

the 'digest method' if needed may be implied from the algorithm. For example RsaSha256 implies Sha256.

Applies to

SigningCredentials(SecurityKey, String, String)

Initializes a new instance of the SigningCredentials class.

public SigningCredentials (Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm, string digest);
new Microsoft.IdentityModel.Tokens.SigningCredentials : Microsoft.IdentityModel.Tokens.SecurityKey * string * string -> Microsoft.IdentityModel.Tokens.SigningCredentials
Public Sub New (key As SecurityKey, algorithm As String, digest As String)

Parameters

algorithm
System.String

The signature algorithm to apply.

digest
System.String

The digest algorithm to apply.

Exceptions

System.ArgumentNullException

if 'digest' is null or empty.

Applies to