Show / Hide Table of Contents

Class AccessTokenCache

The access token cache.

Inheritance
System.Object
AccessTokenCache
Implements
IAccessTokenCache
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 AccessTokenCache : IAccessTokenCache

Constructors

AccessTokenCache(ICache)

Initializes a new instance of the AccessTokenCache class.

Declaration
public AccessTokenCache(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 accessToken)
Parameters
Type Name Description
System.String accessToken

The access token.

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 accessToken)
Parameters
Type Name Description
System.String accessToken

The access token.

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 accessToken, byte[] bytes, TimeSpan? slidingExpiration = null, DateTimeOffset? absoluteExpiration = null)
Parameters
Type Name Description
System.String accessToken

The access token.

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

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