Show / Hide Table of Contents

Interface IOpenIddictApplicationStore<TApplication>

Provides methods allowing to manage the applications stored in a database.

Namespace: OpenIddict.Abstractions
Assembly: cs.temp.dll.dll
Syntax
public interface IOpenIddictApplicationStore<TApplication>
    where TApplication : class
Type Parameters
Name Description
TApplication

The type of the Application entity.

Methods

CountAsync(CancellationToken)

Determines the number of applications that exist in the database.

Declaration
ValueTask<long> CountAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask<System.Int64>

A System.Threading.Tasks.ValueTask that can be used to monitor the asynchronous operation, whose result returns the number of applications in the database.

CountAsync<TResult>(Func<IQueryable<TApplication>, IQueryable<TResult>>, CancellationToken)

Determines the number of applications that match the specified query.

Declaration
ValueTask<long> CountAsync<TResult>(Func<IQueryable<TApplication>, IQueryable<TResult>> query, CancellationToken cancellationToken)
Parameters
Type Name Description
System.Func<IQueryable<TApplication>, IQueryable<TResult>> query

The query to execute.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask<System.Int64>

A System.Threading.Tasks.ValueTask that can be used to monitor the asynchronous operation, whose result returns the number of applications that match the specified query.

Type Parameters
Name Description
TResult

The result type.

CreateAsync(TApplication, CancellationToken)

Creates a new application.

Declaration
ValueTask CreateAsync(TApplication application, CancellationToken cancellationToken)
Parameters
Type Name Description
TApplication application

The application to create.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask

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

DeleteAsync(TApplication, CancellationToken)

Removes an existing application.

Declaration
ValueTask DeleteAsync(TApplication application, CancellationToken cancellationToken)
Parameters
Type Name Description
TApplication application

The application to delete.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask

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

FindByClientIdAsync(String, CancellationToken)

Retrieves an application using its client identifier.

Declaration
ValueTask<TApplication> FindByClientIdAsync(string identifier, CancellationToken cancellationToken)
Parameters
Type Name Description
System.String identifier

The client identifier associated with the application.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask<TApplication>

A System.Threading.Tasks.ValueTask 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.

Declaration
ValueTask<TApplication> FindByIdAsync(string identifier, CancellationToken cancellationToken)
Parameters
Type Name Description
System.String identifier

The unique identifier associated with the application.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask<TApplication>

A System.Threading.Tasks.ValueTask 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.

Declaration
IAsyncEnumerable<TApplication> FindByPostLogoutRedirectUriAsync(string address, CancellationToken cancellationToken)
Parameters
Type Name Description
System.String address

The post_logout_redirect_uri associated with the applications.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Collections.Generic.IAsyncEnumerable<TApplication>

The client applications corresponding to the specified post_logout_redirect_uri.

FindByRedirectUriAsync(String, CancellationToken)

Retrieves all the applications associated with the specified redirect_uri.

Declaration
IAsyncEnumerable<TApplication> FindByRedirectUriAsync(string address, CancellationToken cancellationToken)
Parameters
Type Name Description
System.String address

The redirect_uri associated with the applications.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Collections.Generic.IAsyncEnumerable<TApplication>

The client applications corresponding to the specified redirect_uri.

GetAsync<TState, TResult>(Func<IQueryable<TApplication>, TState, IQueryable<TResult>>, TState, CancellationToken)

Executes the specified query and returns the first element.

Declaration
ValueTask<TResult> GetAsync<TState, TResult>(Func<IQueryable<TApplication>, TState, IQueryable<TResult>> query, TState state, CancellationToken cancellationToken)
Parameters
Type Name Description
System.Func<IQueryable<TApplication>, TState, IQueryable<TResult>> query

The query to execute.

TState state

The optional state.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask<TResult>

A System.Threading.Tasks.ValueTask that can be used to monitor the asynchronous operation, whose result returns the first element returned when executing the query.

Type Parameters
Name Description
TState

The state type.

TResult

The result type.

GetClientIdAsync(TApplication, CancellationToken)

Retrieves the client identifier associated with an application.

Declaration
ValueTask<string> GetClientIdAsync(TApplication application, CancellationToken cancellationToken)
Parameters
Type Name Description
TApplication application

The application.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask<System.String>

A System.Threading.Tasks.ValueTask<TResult> that can be used to monitor the asynchronous operation, whose result returns the client identifier associated with the application.

GetClientSecretAsync(TApplication, CancellationToken)

Retrieves the client secret associated with an application. Note: depending on the manager used to create the application, the client secret may be hashed for security reasons.

Declaration
ValueTask<string> GetClientSecretAsync(TApplication application, CancellationToken cancellationToken)
Parameters
Type Name Description
TApplication application

The application.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask<System.String>

A System.Threading.Tasks.ValueTask<TResult> that can be used to monitor the asynchronous operation, whose result returns the client secret associated with the application.

GetClientTypeAsync(TApplication, CancellationToken)

Retrieves the client type associated with an application.

Declaration
ValueTask<string> GetClientTypeAsync(TApplication application, CancellationToken cancellationToken)
Parameters
Type Name Description
TApplication application

The application.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask<System.String>

A System.Threading.Tasks.ValueTask<TResult> that can be used to monitor the asynchronous operation, whose result returns the client type of the application (by default, "public").

GetConsentTypeAsync(TApplication, CancellationToken)

Retrieves the consent type associated with an application.

Declaration
ValueTask<string> GetConsentTypeAsync(TApplication application, CancellationToken cancellationToken)
Parameters
Type Name Description
TApplication application

The application.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask<System.String>

A System.Threading.Tasks.ValueTask<TResult> that can be used to monitor the asynchronous operation, whose result returns the consent type of the application (by default, "explicit").

GetDisplayNameAsync(TApplication, CancellationToken)

Retrieves the display name associated with an application.

Declaration
ValueTask<string> GetDisplayNameAsync(TApplication application, CancellationToken cancellationToken)
Parameters
Type Name Description
TApplication application

The application.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask<System.String>

A System.Threading.Tasks.ValueTask<TResult> that can be used to monitor the asynchronous operation, whose result returns the display name associated with the application.

GetDisplayNamesAsync(TApplication, CancellationToken)

Retrieves the localized display names associated with an application.

Declaration
ValueTask<ImmutableDictionary<CultureInfo, string>> GetDisplayNamesAsync(TApplication application, CancellationToken cancellationToken)
Parameters
Type Name Description
TApplication application

The application.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask<ImmutableDictionary<CultureInfo, System.String>>

A System.Threading.Tasks.ValueTask<TResult> that can be used to monitor the asynchronous operation, whose result returns all the localized display names associated with the application.

GetIdAsync(TApplication, CancellationToken)

Retrieves the unique identifier associated with an application.

Declaration
ValueTask<string> GetIdAsync(TApplication application, CancellationToken cancellationToken)
Parameters
Type Name Description
TApplication application

The application.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask<System.String>

A System.Threading.Tasks.ValueTask<TResult> that can be used to monitor the asynchronous operation, whose result returns the unique identifier associated with the application.

GetPermissionsAsync(TApplication, CancellationToken)

Retrieves the permissions associated with an application.

Declaration
ValueTask<ImmutableArray<string>> GetPermissionsAsync(TApplication application, CancellationToken cancellationToken)
Parameters
Type Name Description
TApplication application

The application.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask<ImmutableArray<System.String>>

A System.Threading.Tasks.ValueTask<TResult> that can be used to monitor the asynchronous operation, whose result returns all the permissions associated with the application.

GetPostLogoutRedirectUrisAsync(TApplication, CancellationToken)

Retrieves the logout callback addresses associated with an application.

Declaration
ValueTask<ImmutableArray<string>> GetPostLogoutRedirectUrisAsync(TApplication application, CancellationToken cancellationToken)
Parameters
Type Name Description
TApplication application

The application.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask<ImmutableArray<System.String>>

A System.Threading.Tasks.ValueTask<TResult> that can be used to monitor the asynchronous operation, whose result returns all the post_logout_redirect_uri associated with the application.

GetPropertiesAsync(TApplication, CancellationToken)

Retrieves the additional properties associated with an application.

Declaration
ValueTask<ImmutableDictionary<string, JsonElement>> GetPropertiesAsync(TApplication application, CancellationToken cancellationToken)
Parameters
Type Name Description
TApplication application

The application.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask<ImmutableDictionary<System.String, JsonElement>>

A System.Threading.Tasks.ValueTask<TResult> that can be used to monitor the asynchronous operation, whose result returns all the additional properties associated with the application.

GetRedirectUrisAsync(TApplication, CancellationToken)

Retrieves the callback addresses associated with an application.

Declaration
ValueTask<ImmutableArray<string>> GetRedirectUrisAsync(TApplication application, CancellationToken cancellationToken)
Parameters
Type Name Description
TApplication application

The application.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask<ImmutableArray<System.String>>

A System.Threading.Tasks.ValueTask<TResult> that can be used to monitor the asynchronous operation, whose result returns all the redirect_uri associated with the application.

GetRequirementsAsync(TApplication, CancellationToken)

Retrieves the requirements associated with an application.

Declaration
ValueTask<ImmutableArray<string>> GetRequirementsAsync(TApplication application, CancellationToken cancellationToken)
Parameters
Type Name Description
TApplication application

The application.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask<ImmutableArray<System.String>>

A System.Threading.Tasks.ValueTask<TResult> that can be used to monitor the asynchronous operation, whose result returns all the requirements associated with the application.

InstantiateAsync(CancellationToken)

Instantiates a new application.

Declaration
ValueTask<TApplication> InstantiateAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask<TApplication>

A System.Threading.Tasks.ValueTask<TResult> that can be used to monitor the asynchronous operation, whose result returns the instantiated application, that can be persisted in the database.

ListAsync(Nullable<Int32>, Nullable<Int32>, CancellationToken)

Executes the specified query and returns all the corresponding elements.

Declaration
IAsyncEnumerable<TApplication> ListAsync(int? count, int? offset, CancellationToken cancellationToken)
Parameters
Type Name Description
System.Nullable<System.Int32> count

The number of results to return.

System.Nullable<System.Int32> offset

The number of results to skip.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Collections.Generic.IAsyncEnumerable<TApplication>

All the elements returned when executing the specified query.

ListAsync<TState, TResult>(Func<IQueryable<TApplication>, TState, IQueryable<TResult>>, TState, CancellationToken)

Executes the specified query and returns all the corresponding elements.

Declaration
IAsyncEnumerable<TResult> ListAsync<TState, TResult>(Func<IQueryable<TApplication>, TState, IQueryable<TResult>> query, TState state, CancellationToken cancellationToken)
Parameters
Type Name Description
System.Func<IQueryable<TApplication>, TState, IQueryable<TResult>> query

The query to execute.

TState state

The optional state.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Collections.Generic.IAsyncEnumerable<TResult>

All the elements returned when executing the specified query.

Type Parameters
Name Description
TState

The state type.

TResult

The result type.

SetClientIdAsync(TApplication, String, CancellationToken)

Sets the client identifier associated with an application.

Declaration
ValueTask SetClientIdAsync(TApplication application, string identifier, CancellationToken cancellationToken)
Parameters
Type Name Description
TApplication application

The application.

System.String identifier

The client identifier associated with the application.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask

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

SetClientSecretAsync(TApplication, String, CancellationToken)

Sets the client secret associated with an application. Note: depending on the manager used to create the application, the client secret may be hashed for security reasons.

Declaration
ValueTask SetClientSecretAsync(TApplication application, string secret, CancellationToken cancellationToken)
Parameters
Type Name Description
TApplication application

The application.

System.String secret

The client secret associated with the application.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask

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

SetClientTypeAsync(TApplication, String, CancellationToken)

Sets the client type associated with an application.

Declaration
ValueTask SetClientTypeAsync(TApplication application, string type, CancellationToken cancellationToken)
Parameters
Type Name Description
TApplication application

The application.

System.String type

The client type associated with the application.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask

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

SetConsentTypeAsync(TApplication, String, CancellationToken)

Sets the consent type associated with an application.

Declaration
ValueTask SetConsentTypeAsync(TApplication application, string type, CancellationToken cancellationToken)
Parameters
Type Name Description
TApplication application

The application.

System.String type

The consent type associated with the application.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask

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

SetDisplayNameAsync(TApplication, String, CancellationToken)

Sets the display name associated with an application.

Declaration
ValueTask SetDisplayNameAsync(TApplication application, string name, CancellationToken cancellationToken)
Parameters
Type Name Description
TApplication application

The application.

System.String name

The display name associated with the application.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask

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

SetDisplayNamesAsync(TApplication, ImmutableDictionary<CultureInfo, String>, CancellationToken)

Sets the localized display names associated with an application.

Declaration
ValueTask SetDisplayNamesAsync(TApplication application, ImmutableDictionary<CultureInfo, string> names, CancellationToken cancellationToken)
Parameters
Type Name Description
TApplication application

The application.

ImmutableDictionary<CultureInfo, System.String> names

The localized display names associated with the application.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask

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

SetPermissionsAsync(TApplication, ImmutableArray<String>, CancellationToken)

Sets the permissions associated with an application.

Declaration
ValueTask SetPermissionsAsync(TApplication application, ImmutableArray<string> permissions, CancellationToken cancellationToken)
Parameters
Type Name Description
TApplication application

The application.

ImmutableArray<System.String> permissions

The permissions associated with the application

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask

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

SetPostLogoutRedirectUrisAsync(TApplication, ImmutableArray<String>, CancellationToken)

Sets the logout callback addresses associated with an application.

Declaration
ValueTask SetPostLogoutRedirectUrisAsync(TApplication application, ImmutableArray<string> addresses, CancellationToken cancellationToken)
Parameters
Type Name Description
TApplication application

The application.

ImmutableArray<System.String> addresses

The logout callback addresses associated with the application

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask

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

SetPropertiesAsync(TApplication, ImmutableDictionary<String, JsonElement>, CancellationToken)

Sets the additional properties associated with an application.

Declaration
ValueTask SetPropertiesAsync(TApplication application, ImmutableDictionary<string, JsonElement> properties, CancellationToken cancellationToken)
Parameters
Type Name Description
TApplication application

The application.

ImmutableDictionary<System.String, JsonElement> properties

The additional properties associated with the application.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask

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

SetRedirectUrisAsync(TApplication, ImmutableArray<String>, CancellationToken)

Sets the callback addresses associated with an application.

Declaration
ValueTask SetRedirectUrisAsync(TApplication application, ImmutableArray<string> addresses, CancellationToken cancellationToken)
Parameters
Type Name Description
TApplication application

The application.

ImmutableArray<System.String> addresses

The callback addresses associated with the application

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask

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

SetRequirementsAsync(TApplication, ImmutableArray<String>, CancellationToken)

Sets the requirements associated with an application.

Declaration
ValueTask SetRequirementsAsync(TApplication application, ImmutableArray<string> requirements, CancellationToken cancellationToken)
Parameters
Type Name Description
TApplication application

The application.

ImmutableArray<System.String> requirements

The requirements associated with the application

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask

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

UpdateAsync(TApplication, CancellationToken)

Updates an existing application.

Declaration
ValueTask UpdateAsync(TApplication application, CancellationToken cancellationToken)
Parameters
Type Name Description
TApplication application

The application to update.

CancellationToken cancellationToken

The that can be used to abort the operation.

Returns
Type Description
System.Threading.Tasks.ValueTask

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

In This Article
Back to top Generated by DocFX