Fix UI & Rotate Salt
This commit is contained in:
@@ -49,10 +49,10 @@ public partial class ApiController
|
||||
await _mareHub!.SendAsync(nameof(GroupClear), group).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public async Task<GroupPasswordDto> GroupCreate()
|
||||
public async Task<GroupPasswordDto> GroupCreate(string? alias = null)
|
||||
{
|
||||
CheckConnection();
|
||||
return await _mareHub!.InvokeAsync<GroupPasswordDto>(nameof(GroupCreate)).ConfigureAwait(false);
|
||||
return await _mareHub!.InvokeAsync<GroupPasswordDto>(nameof(GroupCreate), string.IsNullOrWhiteSpace(alias) ? null : alias.Trim()).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public async Task<List<string>> GroupCreateTempInvite(GroupDto group, int amount)
|
||||
@@ -125,4 +125,4 @@ public partial class ApiController
|
||||
{
|
||||
if (ServerState is not (ServerState.Connected or ServerState.Connecting or ServerState.Reconnecting)) throw new InvalidDataException("Not connected");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user