Added custom profile claims injector

This commit is contained in:
2026-09-02 15:00:35 +02:00
parent 3be84072d3
commit b8537ff7c6
5 changed files with 59 additions and 18 deletions
+14 -12
View File
@@ -1,24 +1,25 @@
using System;
using System.Threading.Tasks;
using HealthChecks.UI.Client;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using IdentityModel;
using Duende.IdentityServer;
using Duende.IdentityServer.Configuration;
using HealthChecks.UI.Client;
using IdentityModel;
using LiteCharmsSecurity.Admin.EntityFramework.Shared.DbContexts;
using LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity;
using Skoruba.Duende.IdentityServer.Shared.Configuration.Helpers;
using LiteCharmsSecurity.STS.Identity.Configuration;
using LiteCharmsSecurity.STS.Identity.Configuration.Constants;
using LiteCharmsSecurity.STS.Identity.Configuration.Interfaces;
using LiteCharmsSecurity.STS.Identity.Helpers;
using LiteCharmsSecurity.STS.Identity.Passkeys;
using LiteCharmsSecurity.STS.Identity.Services;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Skoruba.Duende.IdentityServer.Shared.Configuration.Helpers;
using System;
using System.Threading.Tasks;
namespace LiteCharmsSecurity.STS.Identity
{
@@ -129,7 +130,8 @@ namespace LiteCharmsSecurity.STS.Identity
public virtual void RegisterAuthentication(IServiceCollection services)
{
services.AddAuthenticationServices<AdminIdentityDbContext, UserIdentity, UserIdentityRole>(Configuration);
services.AddIdentityServer<IdentityServerConfigurationDbContext, IdentityServerPersistedGrantDbContext, UserIdentity>(Configuration);
services.AddIdentityServer<IdentityServerConfigurationDbContext, IdentityServerPersistedGrantDbContext, UserIdentity>(Configuration)
.AddProfileService<ClaimsInjectorProfileService>();
}
public virtual void RegisterAuthorization(IServiceCollection services)