Updeted Session Model and Session Opener Service

renamed RefreshToken in model to RefreshTokenHash - now we have a hash of token, not a token
This commit is contained in:
Artemy
2025-12-14 14:03:18 +07:00
parent 0ad6b52de5
commit cc2921d257
18 changed files with 1153 additions and 191 deletions
@@ -468,8 +468,8 @@ namespace Govor.Data.Migrations
.HasColumnType("date");
b.Property<string>("Description")
.IsRequired()
.HasColumnType("text");
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property<Guid>("IconId")
.HasColumnType("uuid");
@@ -479,11 +479,13 @@ namespace Govor.Data.Migrations
b.Property<string>("PasswordHash")
.IsRequired()
.HasColumnType("text");
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("Username")
.IsRequired()
.HasColumnType("text");
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property<DateTime>("WasOnline")
.HasColumnType("timestamp with time zone");
@@ -492,6 +494,9 @@ namespace Govor.Data.Migrations
b.HasIndex("InviteId");
b.HasIndex("Username")
.IsUnique();
b.ToTable("Users");
});
@@ -515,7 +520,7 @@ namespace Govor.Data.Migrations
b.Property<bool>("IsRevoked")
.HasColumnType("boolean");
b.Property<string>("RefreshToken")
b.Property<string>("RefreshTokenHash")
.IsRequired()
.HasColumnType("text");