Show / Hide Table of Contents

Class AssertionIDCache

Provides a cache for recording previously used SAMLAssertion identifiers. The cache may be used when enforcing single use of SAML assertions.

Inheritance
System.Object
AssertionIDCache
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: ComponentSpace.SAML2.Assertions
Assembly: ComponentSpace.Saml2.dll
Syntax
public static class AssertionIDCache
Remarks

The cache is implemented using the System.Web.Caching.Cache. Use of this cache is entirely optional. Refer to the System.Web.Caching.Cache documentation for usage restrictions.

Properties

Expiration

Gets or sets the expiration time span for cached assertion identifier entries.

Declaration
public static TimeSpan Expiration { get; set; }
Property Value
Type Description
System.TimeSpan

The expiration time span for cached assertion identifier entries.

Methods

Add(SAMLAssertion)

Adds an assertion identifier to the cache. The assertion identifier cannot already exist in the cache.

Declaration
public static bool Add(SAMLAssertion samlAssertion)
Parameters
Type Name Description
SAMLAssertion samlAssertion

The SAML assertion whose identifier is to be cached.

Returns
Type Description
System.Boolean

true if the entry was added in the cache; otherwise false.

Remarks

If the SAML assertion includes a Conditions element with a NotOnOrAfter time then that value is used as the expiration time for the cache entry. Otherwise the default expiration time is used.

Add(String)

Adds an assertion identifier to the cache. The assertion identifier cannot already exist in the cache.

Declaration
public static bool Add(string id)
Parameters
Type Name Description
System.String id

The SAML assertion identifier.

Returns
Type Description
System.Boolean

true if the assertion identifier was added to the cache; otherwise false.

Contains(String)

Indicates whether the assertion identifier is contained in the cache.

Declaration
public static bool Contains(string id)
Parameters
Type Name Description
System.String id

The SAML assertion identifier.

Returns
Type Description
System.Boolean

true if the assertion identifier is contained in the cache; otherwise false.

Remove(String)

Removes an assertion identifier from the cache.

Declaration
public static void Remove(string id)
Parameters
Type Name Description
System.String id

The SAML assertion identifier.

In This Article
Back to top Copyright © ComponentSpace Pty Ltd 2004-2022. All rights reserved.