Saml2SecurityTokenHandler.GetTokenReplayCacheEntryExpirationTime(Saml2SecurityToken) 方法

定义

返回直到应在标记重播缓存中保留的标记的时间。Returns the time until which the token should be held in the token replay cache.

protected:
 virtual DateTime GetTokenReplayCacheEntryExpirationTime(System::IdentityModel::Tokens::Saml2SecurityToken ^ token);
protected virtual DateTime GetTokenReplayCacheEntryExpirationTime (System.IdentityModel.Tokens.Saml2SecurityToken token);
abstract member GetTokenReplayCacheEntryExpirationTime : System.IdentityModel.Tokens.Saml2SecurityToken -> DateTime
override this.GetTokenReplayCacheEntryExpirationTime : System.IdentityModel.Tokens.Saml2SecurityToken -> DateTime
Protected Overridable Function GetTokenReplayCacheEntryExpirationTime (token As Saml2SecurityToken) As DateTime

参数

token
Saml2SecurityToken

返回过期时间的标记。The token for which to return the expiration time.

返回

DateTime

一个 DateTime,表示过期时间。A DateTime that represents the expiration time.

例外

tokennulltoken is null.

注解

默认情况下,此方法返回 SAML 条件的 NotOnOrAfter (如果存在)。By default, this method returns the NotOnOrAfter of the SAML Condition if present.

如果该值不存在,则返回第一个 SubjectConfirmationData 的 NotOnOrAfter。If that value does not exist, it returns the NotOnOrAfter of the first SubjectConfirmationData.

此函数将永远不会从当前时间 (Now) TokenReplayCacheExpirationPeriod 返回值。This function will never return a value further from the current time (Now) than Configuration.TokenReplayCacheExpirationPeriod.

适用于