Template
Feature(Auth): Add Login and Refresh Token
This commit is contained in:
1 parent
bd7e505432
commit
dcc2e99bb1
20 files changed
+252
-20
No files matched your search
@@ -1,6 +0,0 @@
|
||||
namespace RT.Infrastructure;
|
||||
|
||||
public class Class1
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,9 +1,15 @@
|
||||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using RT.Domain.Entities;
|
||||
using RT.Infrastructure.Identity;
|
||||
|
||||
namespace RT.Infrastructure.Data;
|
||||
|
||||
public class AppDbContext(DbContextOptions<AppDbContext> options) : DbContext(options)
|
||||
public class AppDbContext(DbContextOptions<AppDbContext> options)
|
||||
: IdentityDbContext<ApplicationUser>(options)
|
||||
{
|
||||
public DbSet<RefreshToken> RefreshTokens => Set<RefreshToken>();
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
base.OnModelCreating(modelBuilder);
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace RT.Infrastructure.Identity;
|
||||
|
||||
public class ApplicationUser : IdentityUser
|
||||
{
|
||||
public bool MustChangePassword { get; set; }
|
||||
}
|
||||
@@ -6,8 +6,10 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="EFCore.NamingConventions" Version="10.0.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="10.0.11" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.11" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.3" />
|
||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.22.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
||||
Reference in new issue
Block a user