6adbee03eb
- Implemented JwtAuthenticationHandler for Bearer token validation - Created LoginEndpoint for JWT token issuance (POST /api/auth/login) - Added JWT configuration to appsettings.json (Key, Issuer, Audience, ExpirationMinutes) - Updated Program.cs to use JWT authentication in Release mode (replaces FailClosedAuthenticationHandler) - Registered System.IdentityModel.Tokens.Jwt NuGet package - Token validation includes issuer, audience, expiration, and configurable clock skew - Backward compatible: Development mode continues to use DevelopmentHeaderAuthenticationHandler This enables production deployments to use standard JWT-based authentication instead of rejecting all requests. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
42 lines
2.5 KiB
XML
42 lines
2.5 KiB
XML
<Project Sdk="Microsoft.NET.Sdk.Web">
|
|
<PropertyGroup>
|
|
<UserSecretsId>bab7e095-067e-4797-b2ab-df4c1f8b447d</UserSecretsId>
|
|
</PropertyGroup>
|
|
|
|
<!-- Frontend Build Target: Automatically build Vite and copy to wwwroot (dev only) -->
|
|
<!-- FrontendFiles must be globbed *after* pnpm build, inside the target: Vite emits
|
|
content-hashed filenames each build, and a top-level ItemGroup is evaluated once
|
|
at project load (before pnpm build runs), so it would copy stale/missing filenames. -->
|
|
<Target Name="BuildFrontend" BeforeTargets="Build" Condition="'$(CI)' != 'true' AND Exists('$(ProjectDir)../../frontend/package.json')">
|
|
<Exec Command="pnpm install --frozen-lockfile" WorkingDirectory="$(ProjectDir)../../frontend" ContinueOnError="false" />
|
|
<Exec Command="pnpm build" WorkingDirectory="$(ProjectDir)../../frontend" ContinueOnError="false" />
|
|
<ItemGroup>
|
|
<FrontendFiles Include="../../frontend/dist/**/*" />
|
|
</ItemGroup>
|
|
<Copy SourceFiles="@(FrontendFiles)" DestinationFolder="$(ProjectDir)wwwroot/%(RecursiveDir)" />
|
|
</Target>
|
|
|
|
<ItemGroup>
|
|
<ProjectReference Include="../KArtSell.BuildingBlocks/KArtSell.BuildingBlocks.csproj" />
|
|
<ProjectReference Include="../Modules/IdentityAccess/KArtSell.Modules.IdentityAccess.csproj" />
|
|
<ProjectReference Include="../KArtSell.Modules.SignalEngine/KArtSell.Modules.SignalEngine.csproj" />
|
|
<ProjectReference Include="../KArtSell.Modules.ModelOperations/KArtSell.Modules.ModelOperations.csproj" />
|
|
<PackageReference Include="FastEndpoints" />
|
|
<PackageReference Include="Hangfire.AspNetCore" />
|
|
<PackageReference Include="Hangfire.PostgreSql" />
|
|
<PackageReference Include="Newtonsoft.Json" VersionOverride="13.0.3" />
|
|
<PackageReference Include="Npgsql" />
|
|
<PackageReference Include="Polly" />
|
|
<PackageReference Include="Serilog.AspNetCore" />
|
|
<PackageReference Include="Serilog.Settings.Configuration" />
|
|
<PackageReference Include="Serilog.Sinks.Console" />
|
|
<PackageReference Include="OpenTelemetry.Extensions.Hosting" />
|
|
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" />
|
|
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" />
|
|
<PackageReference Include="OpenTelemetry.Instrumentation.Http" />
|
|
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" />
|
|
<PackageReference Include="Swashbuckle.AspNetCore" />
|
|
<PackageReference Include="System.IdentityModel.Tokens.Jwt" />
|
|
</ItemGroup>
|
|
</Project>
|