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
@@ -45,6 +45,7 @@ public static class ConfigurationProgramExtensions
public static void AddServices(this IServiceCollection services)
{
services.AddScoped<IPasswordHasher, PasswordHasher>();
services.AddScoped<IJwtTokenHasher, JwtTokenHasher>();
services.AddScoped<IJwtService, JwtService>();
services.AddScoped<IAccountService, AuthService>();
services.AddScoped<IUsersAdministration, UsersService>();
+1 -2
View File
@@ -41,7 +41,6 @@ public class ProfileController : ControllerBase
_mapper = mapper;
}
[RequestSizeLimit(40_000)]
[HttpPost("avatar")] // api/profile/avatar
public async Task<IActionResult> UploadAvatar([FromForm] AvatarUploadRequest request)
{
@@ -96,7 +95,7 @@ public class ProfileController : ControllerBase
return ms.ToArray();
}
[HttpGet("dowload/me")]
[HttpGet("download/me")]
public async Task<IActionResult> DownloadProfile()
{
try