mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 19:57:23 +01:00
idk
This commit is contained in:
parent
fc9953bb8d
commit
9e6108a4d6
2 changed files with 4 additions and 4 deletions
|
|
@ -270,7 +270,7 @@ public sealed partial class ApiController : DisposableMediatorSubscriberBase, IM
|
|||
|
||||
bool requireReconnect = await RefreshToken(ct).ConfigureAwait(false);
|
||||
|
||||
if (requireReconnect) continue;
|
||||
if (requireReconnect) break;
|
||||
|
||||
_ = await CheckClientHealth().ConfigureAwait(false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,10 +116,10 @@ public sealed class TokenProvider : IDisposable, IMediatorSubscriber
|
|||
throw new InvalidOperationException("No token present");
|
||||
}
|
||||
|
||||
public async Task<string?> GetOrUpdateToken(CancellationToken ct, bool forceRenew = false)
|
||||
public async Task<string?> GetOrUpdateToken(CancellationToken ct)
|
||||
{
|
||||
bool renewal = forceRenew;
|
||||
if (!forceRenew && _tokenCache.TryGetValue(CurrentIdentifier, out var token))
|
||||
bool renewal = false;
|
||||
if (_tokenCache.TryGetValue(CurrentIdentifier, out var token))
|
||||
{
|
||||
var handler = new JwtSecurityTokenHandler();
|
||||
var jwtToken = handler.ReadJwtToken(token);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue