- Add DTOs: RegisterDto, LoginDto, AuthResponse - Add IAuthService interface - Implement AuthService with JWT token generation - Create AuthController with register, login, me endpoints - Add JWT configuration to appsettings.json - Configure JWT Bearer authentication in Program.cs - Add PasswordHasher for custom User entity - Update User entity with ChangePassword method - Add necessary NuGet packages for JWT auth Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
32 lines
1.7 KiB
XML
32 lines
1.7 KiB
XML
<Project Sdk="Microsoft.NET.Sdk.Web">
|
|
|
|
<PropertyGroup>
|
|
<TargetFramework>net9.0</TargetFramework>
|
|
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
|
|
<Nullable>enable</Nullable>
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.16" />
|
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.0" />
|
|
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.0" />
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.0">
|
|
<PrivateAssets>all</PrivateAssets>
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
</PackageReference>
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.0">
|
|
<PrivateAssets>all</PrivateAssets>
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
</PackageReference>
|
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="9.0.0" />
|
|
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="8.0.1" />
|
|
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.0.1" />
|
|
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="9.0.0" />
|
|
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="9.0.0" />
|
|
<PackageReference Include="Serilog.AspNetCore" Version="8.0.0" />
|
|
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.0" />
|
|
</ItemGroup>
|
|
|
|
</Project>
|