Admin panel now delegates authentication entirely to Keycloak using the
Authorization Code flow. The local Identity password form and
IdentityRevalidatingAuthenticationStateProvider are removed. Access requires
the "admin" Keycloak realm role, mirroring the game's role-based auth model.
- Program.cs: AddOpenIdConnect("Keycloak") with cookie session; /auth/challenge
triggers the OIDC flow; /auth/logout signs out of both cookie and Keycloak SSO
- Login.razor: replaced HTML form with an immediate redirect to /auth/challenge
- IdentityRevalidatingAuthenticationStateProvider.cs: deleted (no longer needed)
- appsettings.json: Keycloak:Authority / ClientId / ClientSecret section added
- Directory.Packages.props: pinned Microsoft.AspNetCore.Authentication.OpenIdConnect 8.0.0
- SOR.Admin.csproj: added OpenIdConnect package reference
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
68 lines
5.9 KiB
XML
68 lines
5.9 KiB
XML
<Project>
|
|
<PropertyGroup>
|
|
<!-- Central package management: all NuGet version numbers are declared here once.
|
|
Individual .csproj files use <PackageReference Include="..." /> with no Version attribute.
|
|
This prevents version drift — if you need to upgrade a package, change it here only. -->
|
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
|
</PropertyGroup>
|
|
<ItemGroup>
|
|
<!-- ── Dependency Injection ──────────────────────────────────────────── -->
|
|
<!-- DI abstractions (IServiceCollection, IServiceProvider) for class library projects.
|
|
Web SDK projects (Microsoft.NET.Sdk.Web) get this transitively from the framework.
|
|
Pure class libraries need to reference it directly. -->
|
|
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
|
|
<!-- ── gRPC ────────────────────────────────────────────────────────────── -->
|
|
<!-- ASP.NET Core gRPC server + client + Protobuf code generation -->
|
|
<PackageVersion Include="Grpc.AspNetCore" Version="2.62.0" />
|
|
<!-- gRPC client factory — integrates with ASP.NET Core DI + HttpClientFactory -->
|
|
<PackageVersion Include="Grpc.Net.ClientFactory" Version="2.62.0" />
|
|
<!-- ── NATS ───────────────────────────────────────────────────────────── -->
|
|
<!-- Official NATS .NET client (NATS.Net is the modern unified package) -->
|
|
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.0" />
|
|
<PackageVersion Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.0.0" />
|
|
<PackageVersion Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="8.0.0" />
|
|
<PackageVersion Include="NATS.Net" Version="2.3.0" />
|
|
<!-- ── Redis ─────────────────────────────────────────────────────────── -->
|
|
<!-- StackExchange.Redis: battle-tested, high-performance Redis client for .NET -->
|
|
<PackageVersion Include="StackExchange.Redis" Version="2.7.33" />
|
|
<!-- ── Entity Framework Core ─────────────────────────────────────────── -->
|
|
<!-- EF Core ORM: maps C# classes to database tables, generates SQL queries -->
|
|
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
|
|
<!-- PostgreSQL driver for EF Core (Npgsql) -->
|
|
<PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0" />
|
|
<!-- Design-time tools: enables 'dotnet ef migrations add' commands -->
|
|
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.0" />
|
|
<!-- Identity with EF Core: user/role store backed by a DbContext -->
|
|
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.0" />
|
|
<!-- ── AWS SDK ────────────────────────────────────────────────────────── -->
|
|
<!-- S3-compatible object storage client (also works with Ceph RadosGW) -->
|
|
<PackageVersion Include="AWSSDK.S3" Version="3.7.414.0" />
|
|
<!-- ── Logging ────────────────────────────────────────────────────────── -->
|
|
<!-- Serilog: structured logging library (replaces Microsoft's default logger) -->
|
|
<PackageVersion Include="Serilog.AspNetCore" Version="8.0.0" />
|
|
<!-- Console sink: writes structured log events to stdout -->
|
|
<PackageVersion Include="Serilog.Sinks.Console" Version="5.0.0" />
|
|
<!-- Seq sink: sends logs to a Seq log server for querying and alerting -->
|
|
<PackageVersion Include="Serilog.Sinks.Seq" Version="7.0.0" />
|
|
<!-- ── Serialization ─────────────────────────────────────────────────── -->
|
|
<!-- MessagePack: binary serialization, faster + smaller than JSON.
|
|
Registered as an alternative IMessageSerializer when performance matters. -->
|
|
<PackageVersion Include="MessagePack" Version="2.5.140" />
|
|
<!-- ── Health Checks ─────────────────────────────────────────────────── -->
|
|
<!-- Redis health check for Kubernetes liveness/readiness probes -->
|
|
<PackageVersion Include="AspNetCore.HealthChecks.Redis" Version="8.0.1" />
|
|
<!-- ── Testing ───────────────────────────────────────────────────────── -->
|
|
<!-- xUnit: the test framework (test discovery, runner, assertions) -->
|
|
<PackageVersion Include="xunit" Version="2.6.6" />
|
|
<!-- xUnit Visual Studio adapter: makes tests visible in VS Test Explorer -->
|
|
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.7" />
|
|
<!-- MSTest SDK dependency for xUnit runner -->
|
|
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
|
|
<!-- Moq: create mock implementations of interfaces for unit testing -->
|
|
<PackageVersion Include="Moq" Version="4.20.70" />
|
|
<!-- FluentAssertions: readable assertion syntax (result.Should().BeTrue()) -->
|
|
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
|
|
<!-- In-process test server for integration tests -->
|
|
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.0" />
|
|
</ItemGroup>
|
|
</Project> |