GenericXmlSecurityToken(XmlElement, SecurityToken, DateTime, DateTime, SecurityKeyIdentifierClause, SecurityKeyIdentifierClause, ReadOnlyCollection<IAuthorizationPolicy>) Construtor

Definição

Inicializa uma nova instância da classe GenericXmlSecurityToken.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))

Parâmetros

tokenXml
XmlElement

Um XmlElement que representa o XML que está associado com o token de segurança.An XmlElement that represents the XML that is associated with the security token. Define a propriedade TokenXml.Sets the TokenXml property.

proofToken
SecurityToken

Um SecurityToken que representa o token de prova para o token de segurança.A SecurityToken that represents the proof token for the security token. Define a propriedade ProofToken.Sets the ProofToken property.

effectiveTime
DateTime

Um DateTime que representa o primeiro momento em que esse token de segurança é válido.A DateTime that represents the first instant in time at which this security token is valid. Define a propriedade ValidFrom.Sets the ValidFrom property.

expirationTime
DateTime

Um DateTime que representa o último no momento em que esse token de segurança é válido.A DateTime that represents the last instant in time at which this security token is valid. Define a propriedade ValidFrom.Sets the ValidFrom property.

internalTokenReference
SecurityKeyIdentifierClause

Um SecurityKeyIdentifierClause que representa uma referência a esse token de segurança quando ele está incluído em uma mensagem SOAP na qual ele é referenciado.A SecurityKeyIdentifierClause that represents a reference to this security token when it is included in a SOAP message in which it is referenced. Define a propriedade InternalTokenReference.Sets the InternalTokenReference property.

externalTokenReference
SecurityKeyIdentifierClause

Um SecurityKeyIdentifierClause que representa uma referência a esse token de segurança quando ele está não incluído em uma mensagem SOAP na qual ele é referenciado.A SecurityKeyIdentifierClause that represents a reference to this security token when it is not included in a SOAP message in which it is referenced. Define a propriedade ValidFrom.Sets the ValidFrom property.

authorizationPolicies
ReadOnlyCollection<IAuthorizationPolicy>

Uma ReadOnlyCollection<T> do tipo IAuthorizationPolicy que contém as políticas de autorização de conjunto para este token de segurança.A ReadOnlyCollection<T> of type IAuthorizationPolicy that contains the set authorization policies for this security token.

Exceções

tokenXml é null.tokenXml is null.

- ou --or- proofToken é null.proofToken is null.

Comentários

Quando o internalTokenReference parâmetro é null , uma LocalIdKeyIdentifierClause cláusula de identificador de chave é criada para esse token de segurança e definida como a InternalTokenReference propriedade.When the internalTokenReference parameter is null, a LocalIdKeyIdentifierClause key identifier clause is created for this security token and set to the InternalTokenReference property.

Quando o GenericXmlSecurityToken é obtido em um cenário de Federação, o token de prova contém a chave que é criptografada para o cliente.When the GenericXmlSecurityToken is obtained in a federation scenario, the proof token contains the key that is encrypted for the client.

Aplica-se a