Add formatting to key

This commit is contained in:
honzapatCZ 2026-04-27 19:17:57 +02:00
parent 6bbd2434de
commit 340a53bf19

View File

@ -5,6 +5,7 @@ using System.Text;
using AspNetCore.Authentication.ApiKey; using AspNetCore.Authentication.ApiKey;
using AutoMapPropertyHelper; using AutoMapPropertyHelper;
using NejCommon.Models; using NejCommon.Models;
using NejCommon.Validation;
namespace NejCommon.Models; namespace NejCommon.Models;
@ -12,6 +13,7 @@ public partial class ApiKey : IApiKey
{ {
[AutoMapProperty("Response")] [AutoMapProperty("Response")]
public string Id { get; set; } = NanoidDotNet.Nanoid.Generate(size: 64); public string Id { get; set; } = NanoidDotNet.Nanoid.Generate(size: 64);
[StandardText]
[AutoMapProperty("Request")] [AutoMapProperty("Request")]
public string Name { get; set; } = null!; public string Name { get; set; } = null!;
public byte[] LookupHash { get; set; } = null!; public byte[] LookupHash { get; set; } = null!;