Bearbeiten

Freigeben über


GenericXmlSecurityToken Constructor

Definition

Initializes a new instance of the GenericXmlSecurityToken class.

public:
 GenericXmlSecurityToken(System::Xml::XmlElement ^ tokenXml, System::IdentityModel::Tokens::SecurityToken ^ proofToken, DateTime effectiveTime, DateTime expirationTime, System::IdentityModel::Tokens::SecurityKeyIdentifierClause ^ internalTokenReference, System::IdentityModel::Tokens::SecurityKeyIdentifierClause ^ externalTokenReference, System::Collections::ObjectModel::ReadOnlyCollection<System::IdentityModel::Policy::IAuthorizationPolicy ^> ^ authorizationPolicies);
public GenericXmlSecurityToken (System.Xml.XmlElement tokenXml, System.IdentityModel.Tokens.SecurityToken proofToken, DateTime effectiveTime, DateTime expirationTime, System.IdentityModel.Tokens.SecurityKeyIdentifierClause internalTokenReference, System.IdentityModel.Tokens.SecurityKeyIdentifierClause externalTokenReference, System.Collections.ObjectModel.ReadOnlyCollection<System.IdentityModel.Policy.IAuthorizationPolicy> authorizationPolicies);
new System.IdentityModel.Tokens.GenericXmlSecurityToken : System.Xml.XmlElement * System.IdentityModel.Tokens.SecurityToken * DateTime * DateTime * System.IdentityModel.Tokens.SecurityKeyIdentifierClause * System.IdentityModel.Tokens.SecurityKeyIdentifierClause * System.Collections.ObjectModel.ReadOnlyCollection<System.IdentityModel.Policy.IAuthorizationPolicy> -> System.IdentityModel.Tokens.GenericXmlSecurityToken
Public Sub New (tokenXml As XmlElement, proofToken As SecurityToken, effectiveTime As DateTime, expirationTime As DateTime, internalTokenReference As SecurityKeyIdentifierClause, externalTokenReference As SecurityKeyIdentifierClause, authorizationPolicies As ReadOnlyCollection(Of IAuthorizationPolicy))

Parameters

tokenXml
XmlElement

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

proofToken
SecurityToken

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

effectiveTime
DateTime

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

expirationTime
DateTime

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

internalTokenReference
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
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
ReadOnlyCollection<IAuthorizationPolicy>

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

Exceptions

tokenXml is null.

-or-

proofToken is null.

Remarks

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.

Applies to