using Elsa.Identity.Contracts; using Elsa.Identity.Entities; using Elsa.Identity.Models; // ReSharper disable once CheckNamespace namespace Elsa.Extensions; /// /// Provides extensions for . /// public static class ApplicationProviderExtensions { /// /// Finds the application with the specified client ID. /// /// The user provider. /// The client ID to search by. /// The cancellation token. /// The application with the specified client ID. public static async Task FindByClientIdAsync(this IApplicationProvider applicationProvider, string clientId, CancellationToken cancellationToken = default) { var filter = new ApplicationFilter { ClientId = clientId }; return await applicationProvider.FindAsync(filter, cancellationToken); } }