Muokkaa

Jaa


SamlSecurityTokenHandler.DetectReplayedToken(SecurityToken) Method

Definition

Throws an exception if the specified token already exists in the token replay cache; otherwise the token is added to the cache.

protected:
 override void DetectReplayedToken(System::IdentityModel::Tokens::SecurityToken ^ token);
protected override void DetectReplayedToken (System.IdentityModel.Tokens.SecurityToken token);
override this.DetectReplayedToken : System.IdentityModel.Tokens.SecurityToken -> unit
Protected Overrides Sub DetectReplayedToken (token As SecurityToken)

Parameters

token
SecurityToken

A SecurityToken that represents the SAML 1.1 security token (the token should be of type SamlSecurityToken) to be checked.

Exceptions

token is null.

The Configuration property is null.

-or-

The Caches property of the handler configuration (accessed through the Configuration property) is null.

token cannot be cast as an instance of SamlSecurityToken.

The ID of the assertion associated with the token is null or empty. (The Assertion property of the token references a SamlAssertion that has an AssertionId property that references a Saml2Id with a Value property that is null or empty.)

The token already exists in the TokenReplayCache.

Remarks

The default behavior is to only check bearer tokens (tokens that do not have keys). The token replay cache is the Caches object configured for this handler through the TokenReplayCacheExpirationPeriod property of the SecurityTokenHandlerConfiguration object referenced through the Configuration property.

Applies to