SessionSecurityTokenCacheKey Class

.NET Framework (current version)

Represents the key for an entry in a SessionSecurityTokenCache.

Namespace:   System.IdentityModel.Tokens
Assembly:  System.IdentityModel (in System.IdentityModel.dll)


public class SessionSecurityTokenCacheKey

System_CAPS_pubmethodSessionSecurityTokenCacheKey(String, UniqueId, UniqueId)

Initializes a new instance of the SessionSecurityTokenCacheKey class.


Gets the context ID for the cache key.


Gets the Endpoint ID to which this cache entry is scoped.


Gets or sets a value that indicates whether key generation can be ignored when doing index comparison.


Gets the key generation for the cache key


Determines whether the specified object is the same as the current cache key.(Overrides Object.Equals(Object).)


Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)


Returns a hash code for the current cache key.(Overrides Object.GetHashCode().)


Gets the Type of the current instance.(Inherited from Object.)


Creates a shallow copy of the current Object.(Inherited from Object.)


Overrides ToString to provide a unique identifier.(Overrides Object.ToString().)

System_CAPS_puboperatorSystem_CAPS_staticEquality(SessionSecurityTokenCacheKey, SessionSecurityTokenCacheKey)

Implements the equality operator for the SessionSecurityTokenCacheKey class.

System_CAPS_puboperatorSystem_CAPS_staticInequality(SessionSecurityTokenCacheKey, SessionSecurityTokenCacheKey)

Implements the equality operator for the SessionSecurityTokenCacheKey class.

When caching a SessionSecurityToken there are two indexes required. One is the context ID, represented by the SessionSecurityToken.ContextId property, that is unique across all session tokens. The other is the key generation, represented by the SessionSecurityToken.KeyGeneration property, which is unique within a session token. When a session token is issued it has only a context ID. When the session token is renewed, the key generation is added. After renewal, the renewed session token is uniquely identifiable via the context ID and key generation.

Objects of type SessionSecurityTokenCacheKey are used as the indexes to the session token cache. An index will always have a valid ContextId property specified, but the KeyGeneration property may be null, depending on whether the token has been renewed. There is also an optional EndpointId which gives the endpoint to which the token is scoped.

.NET Framework
Available since 4.5

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top