import type { AuthenticatedUser } from './IdentityProviderPort';

export interface AuthSession {
  user: AuthenticatedUser;
  issuedAt: number;
  expiresAt: number;
  token: string;
}

// Application port for session access/persistence (implemented by adapters).
export interface IdentitySessionPort {
  getCurrentSession(): Promise<AuthSession | null>;
  createSession(user: AuthenticatedUser, options?: { rememberMe?: boolean }): Promise<AuthSession>;
  clearSession(): Promise<void>;
}