Table of Contents

Interface ITokenCache

Namespace
Arc4u.OAuth2.Token
Assembly
Arc4u.OAuth2.dll

A store for the tokens of the current user.

public interface ITokenCache

Methods

DeleteItem(string)

Delete a token based on its unique key.

void DeleteItem(string key)

Parameters

key string

The unique key of the token.

Get<T>(string)

Gets a value.

T? Get<T>(string key)

Parameters

key string

The unique key.

Returns

T

The value, or the default of T when there is none.

Type Parameters

T

The type of the value.

Put<T>(string, T)

Adds or replaces a value.

void Put<T>(string key, T data)

Parameters

key string

The unique key.

data T

The value to store. A null value is ignored by some implementations.

Type Parameters

T

The type of the value.