elsa-core/src/modules/Elsa.Identity/Models/ApiKey.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

12 lines
515 B
C#

using System.Security.Claims;
using AspNetCore.Authentication.ApiKey;
namespace Elsa.Identity.Models;
/// <summary>
/// Represents a validated API key.
/// </summary>
/// <param name="Key">API Key</param>
/// <param name="OwnerName">Owner of the API Key. It can be username or any other key owner name.</param>
/// <param name="Claims">Optional list of claims to be sent back with the authentication request.</param>
public record ApiKey(string Key, string OwnerName, IReadOnlyCollection<Claim> Claims) : IApiKey;