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
TApplicationThe type of the Application entity.
Methods
AddAsync(TApplication, CancellationToken)
Add the specified application to the cache.
ValueTask AddAsync(TApplication application, CancellationToken cancellationToken)
Parameters
applicationTApplicationThe application to add to the cache.
cancellationTokenCancellationTokenThe 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
identifierstringThe client identifier associated with the application.
cancellationTokenCancellationTokenThe 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
identifierstringThe unique identifier associated with the application.
cancellationTokenCancellationTokenThe 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
uristringThe post_logout_redirect_uri associated with the applications.
cancellationTokenCancellationTokenThe 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
uristringThe redirect_uri associated with the applications.
cancellationTokenCancellationTokenThe 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
applicationTApplicationThe application to remove from the cache.
cancellationTokenCancellationTokenThe CancellationToken that can be used to abort the operation.