This documentation is archived and is not being maintained.
GenericXmlSecurityToken Constructor
Visual Studio 2010
Initializes a new instance of the GenericXmlSecurityToken class.
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.
| Exception | Condition |
|---|---|
| ArgumentNullException | tokenXml is nullptr. -or- proofToken is nullptr. |
When the internalTokenReference parameter is nullptr, 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. For more information about federation, see Federation and Issued Tokens.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: