Implemented apikey backend

This commit is contained in:
Masu-Baumgartner
2024-10-30 13:34:19 +01:00
parent 6d0c75ceff
commit fce44f49b6
20 changed files with 90 additions and 260 deletions

View File

@@ -1,4 +1,5 @@
using System.Text.Json;
using MoonCore.Authentication;
using MoonCore.Extended.Abstractions;
using MoonCore.Extended.Extensions;
using MoonCore.Extended.Helpers;
@@ -7,7 +8,6 @@ using MoonCore.Helpers;
using Moonlight.ApiServer.Configuration;
using Moonlight.ApiServer.Database.Entities;
using Moonlight.ApiServer.Helpers;
using Moonlight.ApiServer.Helpers.Authentication;
using Moonlight.ApiServer.Interfaces.Startup;
namespace Moonlight.ApiServer;
@@ -79,7 +79,10 @@ public static class Startup
) ?? [];
// Save permission state
context.User = new PermClaimsPrinciple(permissions, user);
context.User = new PermClaimsPrinciple(permissions)
{
IdentityModel = user
};
return true;
};