Compare commits

..

No commits in common. "21866d54cbe685c60a6e964916d7a79c087b1e6c" and "70780d620a177cf1fecb752db082251fbfe96500" have entirely different histories.

2 changed files with 2 additions and 1 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 { private get; init; } public ReadOnlyMemory<byte> EncryptionKey { 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,6 +14,7 @@ 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)