SamlSubject 构造函数

定义

初始化 SamlSubject 类的新实例。Initializes a new instance of the SamlSubject class.

重载

SamlSubject()

初始化 SamlSubject 类的新实例。Initializes a new instance of the SamlSubject class.

SamlSubject(String, String, String)

使用指定的名称、该名称所在的域以及该名称的格式初始化 SamlSubject 类的新实例。Initializes a new instance of the SamlSubject class using the specified name, the domain in which the name resides, and the format the name is in.

SamlSubject(String, String, String, IEnumerable<String>, String, SecurityKeyIdentifier)

使用指定的名称、该名称所在的域、该名称的格式、身份验证协议、附加身份验证信息和密钥标识符初始化 SamlSubject 类的新实例。Initializes a new instance of the SamlSubject class using the specified name, the domain in which the name resides, the format the name is in, authentication protocols, additional authentication information, and a key identifier.

SamlSubject()

初始化 SamlSubject 类的新实例。Initializes a new instance of the SamlSubject class.

public:
 SamlSubject();
public SamlSubject ();
Public Sub New ()

注解

此构造函数将 IsReadOnly 属性初始化为 falseThis constructor initializes the IsReadOnly property to false.

适用于

SamlSubject(String, String, String)

使用指定的名称、该名称所在的域以及该名称的格式初始化 SamlSubject 类的新实例。Initializes a new instance of the SamlSubject class using the specified name, the domain in which the name resides, and the format the name is in.

public:
 SamlSubject(System::String ^ nameFormat, System::String ^ nameQualifier, System::String ^ name);
public SamlSubject (string nameFormat, string nameQualifier, string name);
new System.IdentityModel.Tokens.SamlSubject : string * string * string -> System.IdentityModel.Tokens.SamlSubject
Public Sub New (nameFormat As String, nameQualifier As String, name As String)

参数

nameFormat
String

一个 URI 引用,表示 name 参数所使用的格式。A URI reference that represents the format that the name parameter is in. 设置 NameFormat 属性。Sets the NameFormat property.

nameQualifier
String

name 参数所在的域。The domain in which the name parameter resides. 设置 NameQualifier 属性。Sets the NameQualifier property.

name
String

主题名称。The subject name. 设置 Name 属性。Sets the Name property.

例外

namenullEmptyname is null or is Empty.

注解

用于指定名称的格式是可扩展的,下表列出了 SAML 规范所定义的格式。Although the format used to specify a name is extensible, the following table lists the formats defined by the SAML specification.

格式Format 描述Description
EmailNamespace 一个 URI,表明 SAML 断言的主题指定为电子邮件地址。A URI that states the subject of a SAML assertion is specified as an email address.
UserNameNamespace 一个 URI,表明 SAML 断言的主题是使用 Windows 域帐户指定的。A URI that states the subject of a SAML assertion is specified using a Windows domain account.

适用于

SamlSubject(String, String, String, IEnumerable<String>, String, SecurityKeyIdentifier)

使用指定的名称、该名称所在的域、该名称的格式、身份验证协议、附加身份验证信息和密钥标识符初始化 SamlSubject 类的新实例。Initializes a new instance of the SamlSubject class using the specified name, the domain in which the name resides, the format the name is in, authentication protocols, additional authentication information, and a key identifier.

public:
 SamlSubject(System::String ^ nameFormat, System::String ^ nameQualifier, System::String ^ name, System::Collections::Generic::IEnumerable<System::String ^> ^ confirmations, System::String ^ confirmationData, System::IdentityModel::Tokens::SecurityKeyIdentifier ^ securityKeyIdentifier);
public SamlSubject (string nameFormat, string nameQualifier, string name, System.Collections.Generic.IEnumerable<string> confirmations, string confirmationData, System.IdentityModel.Tokens.SecurityKeyIdentifier securityKeyIdentifier);
new System.IdentityModel.Tokens.SamlSubject : string * string * string * seq<string> * string * System.IdentityModel.Tokens.SecurityKeyIdentifier -> System.IdentityModel.Tokens.SamlSubject
Public Sub New (nameFormat As String, nameQualifier As String, name As String, confirmations As IEnumerable(Of String), confirmationData As String, securityKeyIdentifier As SecurityKeyIdentifier)

参数

nameFormat
String

一个 URI 引用,表示 name 参数所使用的格式。A URI reference that represents the format that the name parameter is in. 设置 NameFormat 属性。Sets the NameFormat property.

nameQualifier
String

name 参数所在的域。The domain in which the name parameter resides. 设置 NameQualifier 属性。Sets the NameQualifier property.

name
String

主题名称。The subject name. 设置 Name 属性。Sets the Name property.

confirmations
IEnumerable<String>

一个类型为 IEnumerable<T>String,包含多个 URI 引用,这些引用标识用来验证主题身份的协议。An IEnumerable<T> of type String that contains URI references that identify the protocols to authenticate the subject. 设置 ConfirmationMethods 属性。Sets the ConfirmationMethods property.

confirmationData
String

可供身份验证协议使用的附加身份验证信息。Additional authentication information that can be used by authentication protocols. 设置 SubjectConfirmationData 属性。Sets the SubjectConfirmationData property.

securityKeyIdentifier
SecurityKeyIdentifier

一个 SecurityKeyIdentifier,提供对 SamlSecurityToken 安全令牌的主题所持有的加密密钥的访问。A SecurityKeyIdentifier that provides access to a cryptographic key held by the subject of the SamlSecurityToken security token. 设置 KeyIdentifier 属性。Sets the KeyIdentifier property.

例外

namenullEmptyname is null or is Empty.

confirmations 包含一个 nullEmpty 成员。confirmations contains a null or Empty member.

- 或 --or- confirmations 不包含任何成员,并且 namenull 或为 Emptyconfirmations does not contain any members and name is null or is Empty.

- 或 --or- confirmations 不包含任何成员,并且 confirmationDatasecurityKeyIdentifier 不为 nullconfirmations does not contain any members and confirmationData or securityKeyIdentifier are not null.

注解

用于指定 name 参数的名称的格式是可扩展的;下表列出了 SAML 规范所定义的格式。The format used to specify a name for the name parameter is extensible; the following table lists the formats defined by the SAML specification.

格式Format 描述Description
EmailNamespace 一个 URI,表明 SAML 断言的主题指定为电子邮件地址。A URI that states the subject of a SAML assertion is specified as an email address.
UserNameNamespace 一个 URI,表明 SAML 断言的主题是使用 Windows 域帐户指定的。A URI that states the subject of a SAML assertion is specified using a Windows domain account.

要为 confirmations 参数指定的身份验证协议的集合是可扩展的;但是下表列出了 SAML 规范所定义的协议。The set of authentication protocols to specify for the confirmations parameter is extensible; however the following table lists the protocols defined by the SAML specification.

协议Protocol 描述Description
HolderOfKey 一个 URI,指定 SamlSecurityToken 安全令牌的接收方应使用 KeyIdentifier 属性来确认 SOAP 消息是否是由 SAML 断言的主题发送的。A URI that specifies that the recipient of a SamlSecurityToken security token should use the KeyIdentifier property to confirm that the SOAP message was sent by the SAML assertion's subject.
SenderVouches 一个 URI,指定 SAML 安全令牌的接收方无法使用附加信息来确认 SOAP 消息是由 SAML 断言的主题发送的。A URI that specifies that additional information is not available for a recipient of a SAML security token to confirm that the SOAP message was sent by the SAML assertion's subject.

适用于