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
@@ -5,6 +5,6 @@ namespace Govor.Core.Repositories.UserSessionsRepository;
public interface IUserSessionsExist
{
public bool Exist(Guid sessionId);
public bool Exist(string refresh);
public bool Exist(string hashedToken);
public bool Exist(UserSession userSession);
}
@@ -10,5 +10,5 @@ public interface IUserSessionsReader
public Task<List<UserSession>> GetByCreatedAtAsync(DateTime createdAt);
public Task<List<UserSession>> GetByExpiresAtAsync(DateTime createdAt);
public Task<List<UserSession>> GetByRevokedAsync(bool isRevoked);
public Task<UserSession> GetByRefreshTokenAsync(string refreshToken);
public Task<UserSession> GetByHashedRefreshTokenAsync(string hash);
}