Extract IDP configuration to external JSON file

Move all hard-coded identity server settings (API resource, scope, client,
users/roles) from Program.cs into config/idp-config.json and add parsing
logic. The config file is copied to the output directory so it works for
local development and is available at /app/config/idp-config.json in the
Docker image, making it straightforward to override via a volume mount.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marek Lesko
2026-03-22 11:22:33 +00:00
parent 0a585dd5a2
commit e4c25bfaa7
3 changed files with 194 additions and 87 deletions
+5
View File
@@ -10,6 +10,11 @@
<PackageReference Include="SimpleIdServer.IdServer" Version="6.0.*-*" />
<PackageReference Include="Microsoft.Web.LibraryManager.Build" Version="2.1.175" />
</ItemGroup>
<ItemGroup>
<Content Include="config\idp-config.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Compile Update="Resources\AccountsResource.Designer.cs">
<DependentUpon>AccountsResource.resx</DependentUpon>