mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-31 09:02:41 +01:00
Buff system identity cache expiry times
This commit is contained in:
@@ -141,7 +141,13 @@ namespace Tgstation.Server.Host.Controllers
|
||||
|
||||
var token = await tokenFactory.CreateToken(user, cancellationToken).ConfigureAwait(false);
|
||||
if (identity != null)
|
||||
identityCache.CacheSystemIdentity(user, identity, token.ExpiresAt.Value.AddMinutes(1)); //expire the identity slightly after the auth token in case of lag
|
||||
{
|
||||
//expire the identity slightly after the auth token in case of lag
|
||||
var identExpiry = token.ExpiresAt.Value;
|
||||
identExpiry += tokenFactory.ValidationParameters.ClockSkew;
|
||||
identExpiry += TimeSpan.FromSeconds(15);
|
||||
identityCache.CacheSystemIdentity(user, identity, identExpiry);
|
||||
}
|
||||
|
||||
Logger.LogDebug("Successfully logged in user {0}!", user.Id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user