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.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft