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

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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.

Namespace:   System.IdentityModel.Tokens
Assembly:  System.IdentityModel (in System.IdentityModel.dll)

public SamlSubject(
	string nameFormat,
	string nameQualifier,
	string name,
	IEnumerable<string> confirmations,
	string confirmationData,
	SecurityKeyIdentifier securityKeyIdentifier
)

Parameters

nameFormat
Type: System.String

A URI reference that represents the format that the name parameter is in. Sets the NameFormat property.

nameQualifier
Type: System.String

The domain in which the name parameter resides. Sets the NameQualifier property.

name
Type: System.String

The subject name. Sets the Name property.

confirmations
Type: System.Collections.Generic.IEnumerable<String>

An IEnumerable<T> of type String that contains URI references that identify the protocols to authenticate the subject. Sets the ConfirmationMethods property.

confirmationData
Type: System.String

Additional authentication information that can be used by authentication protocols. Sets the SubjectConfirmationData property.

securityKeyIdentifier
Type: System.IdentityModel.Tokens.SecurityKeyIdentifier

A SecurityKeyIdentifier that provides access to a cryptographic key held by the subject of the SamlSecurityToken security token. Sets the KeyIdentifier property.

Exception Condition
ArgumentNullException

name is null or is Empty.

ArgumentException

confirmations contains a null or Empty member.

-or-

confirmations does not contain any members and name is null or is Empty.

-or-

confirmations does not contain any members and confirmationData or securityKeyIdentifier are not null.

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

A URI that states the subject of a SAML assertion is specified as an email address.

UserNameNamespace

A URI that states the subject of a SAML assertion is specified using a Windows domain account.

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

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

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.

.NET Framework
Available since 3.0
Return to top
Show: