elsa-core/src/modules/Elsa.Identity/Providers/StoreBasedApplicationProvider.cs
Sipke Schoorstra 30c4e5b1e7
Implement API key authentication (#3834)
* Implement API key storage

* Implement API key validation

* Implement EF Core providers
2023-03-26 23:53:17 +02:00

27 lines
887 B
C#

using Elsa.Identity.Contracts;
using Elsa.Identity.Entities;
using Elsa.Identity.Models;
namespace Elsa.Identity.Providers;
/// <summary>
/// Represents an application provider that uses <see cref="IApplicationStore"/> to find applications.
/// </summary>
public class StoreBasedApplicationProvider : IApplicationProvider
{
private readonly IApplicationStore _applicationStore;
/// <summary>
/// Initializes a new instance of the <see cref="StoreBasedApplicationProvider"/> class.
/// </summary>
public StoreBasedApplicationProvider(IApplicationStore applicationStore)
{
_applicationStore = applicationStore;
}
/// <inheritdoc />
public async Task<Application?> FindAsync(ApplicationFilter filter, CancellationToken cancellationToken = default)
{
return await _applicationStore.FindAsync(filter, cancellationToken);
}
}