Files
qhmes/yy-admin-master/YY.Admin.Services/Service/Auth/ISysAuthService.cs

27 lines
1.0 KiB
C#
Raw Normal View History


namespace YY.Admin.Services.Service.Auth
{
public interface ISysAuthService
{
Task<LoginOutput> LoginAsync(LoginInput request);
void LogoutAsync();
Task<bool> IsAuthenticatedAsync();
bool ValidateToken(string accessToken);
Task RefreshToken(string? accessToken);
SysUser? CurrentUser { get; }
event EventHandler<SysUser?> UserChanged;
Task UpdateUserLoginInfoAsync(SysUser sysUser);
/// <summary>
/// 使用缓存的 Jeecg Token 做用户增量同步(定时/WebSocket 调用,断网恢复后自动补拉)
/// </summary>
Task<bool> TryBackgroundSyncJeecgUsersAsync(CancellationToken cancellationToken = default);
/// <summary>
/// 登录页一键同步 Jeecg 用户到本地 SQLite依赖 SCADA 免登录 queryUser无需先登录
/// </summary>
Task<(bool Success, string Message)> SyncJeecgUsersToLocalFromLoginScreenAsync(CancellationToken cancellationToken = default);
}
}