Compare commits
No commits in common. "21866d54cbe685c60a6e964916d7a79c087b1e6c" and "70780d620a177cf1fecb752db082251fbfe96500" have entirely different histories.
21866d54cb
...
70780d620a
@ -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)
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user