Show / Hide Table of Contents

Class AuthCodeCache

The authorization code cache.

Inheritance
System.Object
AuthCodeCache
Implements
IAuthCodeCache
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ComponentSpace.OpenID.Cache
Assembly: ComponentSpace.OpenID.dll
Syntax
public class AuthCodeCache : IAuthCodeCache

Constructors

AuthCodeCache(ICache)

Initializes a new instance of the AuthCodeCache class.

Declaration
public AuthCodeCache(ICache cache)
Parameters
Type Name Description
ICache cache

The cache used to store entries.

Methods

GetAsync(String)

Gets the entry from the cache.

Declaration
public virtual async Task<byte[]> GetAsync(string authorizationCode)
Parameters
Type Name Description
System.String authorizationCode

The authorization code.

Returns
Type Description
Task<System.Byte[]>

A task that represents the get operation and returns the cache entry or null.

RemoveAsync(String)

Removes the entry from the cache.

Declaration
public virtual async Task RemoveAsync(string authorizationCode)
Parameters
Type Name Description
System.String authorizationCode

The authorization code.

Returns
Type Description
Task

A task that represents the remove operation.

SetAsync(String, Byte[], Nullable<TimeSpan>, Nullable<DateTimeOffset>)

Sets the entry in the cache.

Declaration
public virtual async Task SetAsync(string authorizationCode, byte[] bytes, TimeSpan? slidingExpiration = null, DateTimeOffset? absoluteExpiration = null)
Parameters
Type Name Description
System.String authorizationCode

The authorization code.

System.Byte[] bytes

The cache entry.

System.Nullable<TimeSpan> slidingExpiration

The sliding expiration.

System.Nullable<DateTimeOffset> absoluteExpiration

The absolute expiration.

Returns
Type Description
Task

A task that represents the set operation.

Implements

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