Files
2026-06-02 10:56:03 +02:00

18 lines
629 B
C#

namespace SharepointToolbox.Web.Services.Auth;
public interface ITokenRefreshService
{
/// <summary>
/// Exchanges a refresh token for a new access token using the public-client flow (no secret).
/// ClientId is per-tenant (from TenantProfile) — no global secret required.
/// </summary>
Task<TokenRefreshResult> RefreshAsync(string refreshToken, string tenantId, string clientId, string scope);
}
public class TokenRefreshResult
{
public string AccessToken { get; set; } = string.Empty;
public string RefreshToken { get; set; } = string.Empty;
public DateTimeOffset ExpiresAt { get; set; }
}