using ROLAC.API.DTOs.Auth;
namespace ROLAC.API.Services;
public interface IAuthService
{
///
/// Validates credentials and returns a new access token plus the raw refresh token
/// that must be stored in an HttpOnly cookie by the caller.
/// Throws on any auth failure.
///
Task<(LoginResponse Response, string RawRefreshToken)> LoginAsync(
LoginRequest request,
string? ipAddress = null,
string? deviceInfo = null);
///
/// Validates a raw refresh token, revokes it, and issues a new token pair (rotation).
/// Throws if the token is not found,
/// expired, or already revoked.
///
Task<(LoginResponse Response, string RawRefreshToken)> RefreshAsync(
string rawRefreshToken,
string? ipAddress = null);
///
/// Revokes the refresh token identified by its raw value.
/// Silently succeeds if the token is not found.
///
Task LogoutAsync(string rawRefreshToken);
}