Files
Govor/Govor.Application/Services/Authentication/JwtTokenHasher.cs
T
Artemy cc2921d257 Updeted Session Model and Session Opener Service
renamed RefreshToken in model to RefreshTokenHash - now we have a hash of token, not a token
2025-12-14 14:03:18 +07:00

16 lines
413 B
C#

using Govor.Application.Interfaces.Authentication;
namespace Govor.Application.Services.Authentication;
public class JwtTokenHasher : IJwtTokenHasher
{
public string HashToken(string token)
{
return BCrypt.Net.BCrypt.HashPassword(token, workFactor: 13);
}
public bool VerifyToken(string token, string storedHash)
{
return BCrypt.Net.BCrypt.Verify(token, storedHash);
}
}