Table of Contents

Interface IOpenIddictApplicationCache<TApplication>

Namespace
OpenIddict.Abstractions
Assembly
OpenIddict.Abstractions.dll

Provides methods allowing to cache applications after retrieving them from the store.

public interface IOpenIddictApplicationCache<TApplication> where TApplication : class

Type Parameters

TApplication

The type of the Application entity.

Methods

AddAsync(TApplication, CancellationToken)

Add the specified application to the cache.

ValueTask AddAsync(TApplication application, CancellationToken cancellationToken)

Parameters

application TApplication

The application to add to the cache.

cancellationToken CancellationToken

The CancellationToken that can be used to abort the operation.

Returns

ValueTask

A ValueTask that can be used to monitor the asynchronous operation.

FindByClientIdAsync(string, CancellationToken)

Retrieves an application using its client identifier.

ValueTask<TApplication?> FindByClientIdAsync(string identifier, CancellationToken cancellationToken)

Parameters

identifier string

The client identifier associated with the application.

cancellationToken CancellationToken

The CancellationToken that can be used to abort the operation.

Returns

ValueTask<TApplication>

A ValueTask<TResult> that can be used to monitor the asynchronous operation, whose result returns the client application corresponding to the identifier.

FindByIdAsync(string, CancellationToken)

Retrieves an application using its unique identifier.

ValueTask<TApplication?> FindByIdAsync(string identifier, CancellationToken cancellationToken)

Parameters

identifier string

The unique identifier associated with the application.

cancellationToken CancellationToken

The CancellationToken that can be used to abort the operation.

Returns

ValueTask<TApplication>

A ValueTask<TResult> that can be used to monitor the asynchronous operation, whose result returns the client application corresponding to the identifier.

FindByPostLogoutRedirectUriAsync(string, CancellationToken)

Retrieves all the applications associated with the specified post_logout_redirect_uri.

IAsyncEnumerable<TApplication> FindByPostLogoutRedirectUriAsync(string uri, CancellationToken cancellationToken)

Parameters

uri string

The post_logout_redirect_uri associated with the applications.

cancellationToken CancellationToken

The CancellationToken that can be used to abort the operation.

Returns

IAsyncEnumerable<TApplication>

The client applications corresponding to the specified redirect_uri.

FindByRedirectUriAsync(string, CancellationToken)

Retrieves all the applications associated with the specified redirect_uri.

IAsyncEnumerable<TApplication> FindByRedirectUriAsync(string uri, CancellationToken cancellationToken)

Parameters

uri string

The redirect_uri associated with the applications.

cancellationToken CancellationToken

The CancellationToken that can be used to abort the operation.

Returns

IAsyncEnumerable<TApplication>

The client applications corresponding to the specified redirect_uri.

RemoveAsync(TApplication, CancellationToken)

Removes the specified application from the cache.

ValueTask RemoveAsync(TApplication application, CancellationToken cancellationToken)

Parameters

application TApplication

The application to remove from the cache.

cancellationToken CancellationToken

The CancellationToken that can be used to abort the operation.

Returns

ValueTask

A ValueTask that can be used to monitor the asynchronous operation.