SamlSecurityTokenHandler.CreateConditions(Lifetime, String, SecurityTokenDescriptor) Método

Definição

Cria as condições para a asserção.Creates the conditions for the assertion.

protected:
 virtual System::IdentityModel::Tokens::SamlConditions ^ CreateConditions(System::IdentityModel::Protocols::WSTrust::Lifetime ^ tokenLifetime, System::String ^ relyingPartyAddress, System::IdentityModel::Tokens::SecurityTokenDescriptor ^ tokenDescriptor);
protected virtual System.IdentityModel.Tokens.SamlConditions CreateConditions (System.IdentityModel.Protocols.WSTrust.Lifetime tokenLifetime, string relyingPartyAddress, System.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor);
abstract member CreateConditions : System.IdentityModel.Protocols.WSTrust.Lifetime * string * System.IdentityModel.Tokens.SecurityTokenDescriptor -> System.IdentityModel.Tokens.SamlConditions
override this.CreateConditions : System.IdentityModel.Protocols.WSTrust.Lifetime * string * System.IdentityModel.Tokens.SecurityTokenDescriptor -> System.IdentityModel.Tokens.SamlConditions
Protected Overridable Function CreateConditions (tokenLifetime As Lifetime, relyingPartyAddress As String, tokenDescriptor As SecurityTokenDescriptor) As SamlConditions

Parâmetros

tokenLifetime
Lifetime

O tempo de vida do token.The lifetime of the token.

relyingPartyAddress
String

O endereço do ponto de extremidade para o qual o token é criado.The endpoint address for which the token is created. O endereço é modelado como uma condição de AudienceRestriction.The address is modeled as an AudienceRestriction condition.

tokenDescriptor
SecurityTokenDescriptor

O descritor do token.The token descriptor.

Retornos

SamlConditions

Um objeto SamlConditions que contém as condições para a asserção.A SamlConditions object that contains the conditions for the assertion.

Comentários

Em geral, as condições devem ser incluídas em asserções para limitar o impacto do uso indevido da declaração.Generally, conditions should be included in assertions to limit the impact of misuse of the assertion. Especificar as condições nobefore e NotOnOrAfter pode limitar o período de vulnerabilidade no caso de uma declaração comprometida.Specifying the NotBefore and NotOnOrAfter conditions can limit the period of vulnerability in the case of a compromised assertion. O AudienceRestrictionCondition pode ser usado para declarar explicitamente a terceira parte confiável pretendida ou partes da declaração, que combinadas com a imposição de restrição de público apropriada em partes confiáveis podem ajudar a atenuar ataques de falsificação entre as partes confiantes.The AudienceRestrictionCondition can be used to explicitly state the intended relying party or parties of the assertion, which coupled with appropriate audience restriction enforcement at relying parties can help to mitigate spoofing attacks between relying parties.

A implementação padrão cria condições não antes e NotOnOrAfter com base na Lifetime Propriedade do tokenDescriptor .The default implementation creates NotBefore and NotOnOrAfter conditions based on the Lifetime property of the tokenDescriptor. Ele também gerará um AudienceRestrictionCondition limitando o consumo da asserção à AppliesToAddress Propriedade do tokenDescriptor .It will also generate an AudienceRestrictionCondition limiting consumption of the assertion to the AppliesToAddress property of the tokenDescriptor.

Aplica-se a