namespace Application.Abstractions.YouTube;

/// <summary>
/// Google OAuth 2.0 Authorization Code Flow
/// ID Token 검증(기존) 외에 Access Token 획득/갱신을 위한 서비스
/// </summary>
public interface IGoogleOAuthService
{
    /// <summary>Authorization URL 생성 (프론트엔드 리다이렉트용)</summary>
    string GetAuthorizationUrl(string state, string redirectUri, string[] scopes);

    /// <summary>Authorization Code → Access Token + Refresh Token 교환</summary>
    Task<GoogleOAuthTokens?> ExchangeCodeAsync(string code, string redirectUri, string clientId, string clientSecret, CancellationToken ct);

    /// <summary>Refresh Token으로 Access Token 갱신</summary>
    Task<GoogleOAuthTokens?> RefreshTokenAsync(string refreshToken, CancellationToken ct);

    /// <summary>OAuth 토큰 revoke (앱 접근 권한 해제)</summary>
    Task RevokeTokenAsync(string token, CancellationToken ct);
}