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
TApplicationThe application to add to the cache.
cancellationToken
CancellationTokenThe CancellationToken that can be used to abort the operation.
Returns
FindByClientIdAsync(string, CancellationToken)
Retrieves an application using its client identifier.
ValueTask<TApplication?> FindByClientIdAsync(string identifier, CancellationToken cancellationToken)
Parameters
identifier
stringThe client identifier associated with the application.
cancellationToken
CancellationTokenThe 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
stringThe unique identifier associated with the application.
cancellationToken
CancellationTokenThe 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
stringThe post_logout_redirect_uri associated with the applications.
cancellationToken
CancellationTokenThe 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
stringThe redirect_uri associated with the applications.
cancellationToken
CancellationTokenThe 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
TApplicationThe application to remove from the cache.
cancellationToken
CancellationTokenThe CancellationToken that can be used to abort the operation.