Compare commits

...

2 Commits

Author SHA1 Message Date
21866d54cb fix: add private to get EncryptKey
All checks were successful
.NET Test Pipeline / build-and-test (push) Successful in 2m34s
2024-06-13 00:42:41 +03:00
eba11f515d fix: singleton added in JwtTokenService 2024-06-13 00:42:15 +03:00
2 changed files with 1 additions and 2 deletions

View File

@ -13,7 +13,7 @@ public class JwtTokenService : IAccessToken
public required string Audience { private get; init; } public required string Audience { private get; init; }
public TimeSpan Lifetime { private get; init; } public TimeSpan Lifetime { private get; init; }
public ReadOnlyMemory<byte> EncryptionKey { get; init; } public ReadOnlyMemory<byte> EncryptionKey { private get; init; }
public ReadOnlyMemory<byte> SigningKey { private get; init; } public ReadOnlyMemory<byte> SigningKey { private get; init; }
public (string Token, DateTime ExpireIn) GenerateToken(string userId) public (string Token, DateTime ExpireIn) GenerateToken(string userId)

View File

@ -14,7 +14,6 @@ public static class SecureConfiguration
{ {
services.AddSecurityServices(configuration); services.AddSecurityServices(configuration);
services.AddSingleton<IAccessToken, JwtTokenService>();
services.AddSingleton<IRevokedToken, MemoryRevokedTokenService>(); services.AddSingleton<IRevokedToken, MemoryRevokedTokenService>();
if (configuration.Get<GeneralConfig>()?.CacheSettings?.TypeDatabase == CacheSettings.CacheEnum.Redis) if (configuration.Get<GeneralConfig>()?.CacheSettings?.TypeDatabase == CacheSettings.CacheEnum.Redis)