X509SecurityToken 构造函数

定义

初始化 X509SecurityToken 类的新实例。

重载

X509SecurityToken(X509Certificate2)

使用指定的 X.509 证书初始化 X509SecurityToken 类的新实例。

X509SecurityToken(X509Certificate2, String)

使用指定的 X.509 证书和唯一标识符初始化 X509SecurityToken 类的新实例。

X509SecurityToken(X509Certificate2)

Source:
X509SecurityToken.cs
Source:
X509SecurityToken.cs
Source:
X509SecurityToken.cs

使用指定的 X.509 证书初始化 X509SecurityToken 类的新实例。

public:
 X509SecurityToken(System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate);
public X509SecurityToken (System.Security.Cryptography.X509Certificates.X509Certificate2 certificate);
new System.IdentityModel.Tokens.X509SecurityToken : System.Security.Cryptography.X509Certificates.X509Certificate2 -> System.IdentityModel.Tokens.X509SecurityToken
Public Sub New (certificate As X509Certificate2)

参数

certificate
X509Certificate2

一个包含 X.509 证书的 X509Certificate2。 设置 Certificate 属性。

例外

certificatenull

注解

此构造函数创建 X509SecurityToken 安全令牌的唯一标识符,并将该值分配给 Id 属性。

适用于

X509SecurityToken(X509Certificate2, String)

Source:
X509SecurityToken.cs
Source:
X509SecurityToken.cs
Source:
X509SecurityToken.cs

使用指定的 X.509 证书和唯一标识符初始化 X509SecurityToken 类的新实例。

public:
 X509SecurityToken(System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate, System::String ^ id);
public X509SecurityToken (System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, string id);
new System.IdentityModel.Tokens.X509SecurityToken : System.Security.Cryptography.X509Certificates.X509Certificate2 * string -> System.IdentityModel.Tokens.X509SecurityToken
Public Sub New (certificate As X509Certificate2, id As String)

参数

certificate
X509Certificate2

一个包含 X.509 证书的 X509Certificate2。 设置 Certificate 属性。

id
String

安全令牌的唯一标识符。 设置 Id 属性。

例外

certificatenull

- 或 -

id 为 null。

适用于