Export (0) Print
Expand All

GenericXmlSecurityToken Constructor

Initializes a new instance of the GenericXmlSecurityToken class.

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

public GenericXmlSecurityToken(
	XmlElement tokenXml,
	SecurityToken proofToken,
	DateTime effectiveTime,
	DateTime expirationTime,
	SecurityKeyIdentifierClause internalTokenReference,
	SecurityKeyIdentifierClause externalTokenReference,
	ReadOnlyCollection<IAuthorizationPolicy> authorizationPolicies
)

Parameters

tokenXml
Type: System.Xml.XmlElement

An XmlElement that represents the XML that is associated with the security token. Sets the TokenXml property.

proofToken
Type: System.IdentityModel.Tokens.SecurityToken

A SecurityToken that represents the proof token for the security token. Sets the ProofToken property.

effectiveTime
Type: System.DateTime

A DateTime that represents the first instant in time at which this security token is valid. Sets the ValidFrom property.

expirationTime
Type: System.DateTime

A DateTime that represents the last instant in time at which this security token is valid. Sets the ValidFrom property.

internalTokenReference
Type: System.IdentityModel.Tokens.SecurityKeyIdentifierClause

A SecurityKeyIdentifierClause that represents a reference to this security token when it is included in a SOAP message in which it is referenced. Sets the InternalTokenReference property.

externalTokenReference
Type: System.IdentityModel.Tokens.SecurityKeyIdentifierClause

A SecurityKeyIdentifierClause that represents a reference to this security token when it is not included in a SOAP message in which it is referenced. Sets the ValidFrom property.

authorizationPolicies
Type: System.Collections.ObjectModel.ReadOnlyCollection<IAuthorizationPolicy>

A ReadOnlyCollection<T> of type IAuthorizationPolicy that contains the set authorization policies for this security token.

ExceptionCondition
ArgumentNullException

tokenXml is null.

-or-

proofToken is null.

When the internalTokenReference parameter is null, a LocalIdKeyIdentifierClause key identifier clause is created for this security token and set to the InternalTokenReference property.

When the GenericXmlSecurityToken is obtained in a federation scenario, the proof token contains the key that is encrypted for the client.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft