<tokenReplayCache>

Registers a token replay cache with a service or a security token handler collection.

<configuration>
  <system.identityModel>
    <identityConfiguration>
      <caches>
        <tokenReplayCache>

Syntax

<system.identityModel>  
  <identityConfiguration>  
    <caches>  
      <tokenReplayCache type=xs:string>  
      </tokenReplayCache>  
    </caches>  
  </identityConfiguration>  
</system.identityModel>  

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description
type A type that derives from the TokenReplayCache class. For more information about how to specify a custom type, see [Custom Type References].

Child Elements

None

Parent Elements

Element Description
<caches> Registers the caches used by a service or a security token handler collection.

Remarks

The token replay cache is used to detect replayed tokens. Token replay detection is enabled by the <tokenReplayDetection> element, which also specifies the maximum expiration time for tokens.

Example

The following XML shows the configuration of a custom cache for detecting replayed tokens.

<caches>  
  <tokenReplayCache type="MyCacheLibrary.MyTokenReplayCache, MyCacheLibrary">  
  </tokenReplayCache>  
</caches>  

See also