Show / Hide Table of Contents

Interface IAccessTokenCache

The access token cache.

Namespace: ComponentSpace.OpenID.Cache
Assembly: ComponentSpace.OpenID.dll
Syntax
public interface IAccessTokenCache

Methods

GetAsync(String)

Gets the entry from the cache.

Declaration
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
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
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.

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