Fix UI & Rotate Salt

This commit is contained in:
2025-09-19 22:33:40 +02:00
parent 1755b5cb54
commit 612e7c88a2
7 changed files with 92 additions and 35 deletions

View File

@@ -172,6 +172,16 @@ public sealed class TokenProvider : IDisposable, IMediatorSubscriber
return await GetNewToken(jwtIdentifier, ct).ConfigureAwait(false);
}
public async Task<string?> ForceRefreshToken(CancellationToken ct)
{
JwtIdentifier? jwtIdentifier = await GetIdentifier().ConfigureAwait(false);
if (jwtIdentifier == null) return null;
_tokenCache.TryRemove(jwtIdentifier, out _);
_logger.LogTrace("ForceRefresh: Getting new token");
return await GetNewToken(jwtIdentifier, ct).ConfigureAwait(false);
}
public string? GetStapledWellKnown(string apiUrl)
{
_wellKnownCache.TryGetValue(apiUrl, out var wellKnown);
@@ -180,4 +190,4 @@ public sealed class TokenProvider : IDisposable, IMediatorSubscriber
return null;
return wellKnown;
}
}
}