Creates the conditions for the assertion.
Assembly: System.IdentityModel (in System.IdentityModel.dll)
protected virtual SamlConditions CreateConditions( Lifetime tokenLifetime, string relyingPartyAddress, SecurityTokenDescriptor tokenDescriptor )
- Type: System.IdentityModel.Protocols.WSTrust.Lifetime
The lifetime of the token.
- Type: System.String
The endpoint address for which the token is created. The address is modeled as an AudienceRestriction condition.
- Type: System.IdentityModel.Tokens.SecurityTokenDescriptor
The token descriptor.
Generally, conditions should be included in assertions to limit the impact of misuse of the assertion. Specifying the NotBefore and NotOnOrAfter conditions can limit the period of vulnerability in the case of a compromised assertion. 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.
The default implementation creates NotBefore and NotOnOrAfter conditions based on the Lifetime property of the tokenDescriptor. It will also generate an AudienceRestrictionCondition limiting consumption of the assertion to the AppliesToAddress property of the tokenDescriptor.