"""Data models for authentication."""

from dataclasses import dataclass
from typing import Optional


@dataclass
class AuthenticatedUser:
    """Represents an authenticated user from Supabase JWT."""
    
    sub: str  # Supabase user ID (stable, use as canonical identity)
    email: Optional[str] = None
    email_verified: bool = False
    
    # Raw claims for extensibility
    raw_claims: Optional[dict] = None
    
    @property
    def supabase_uid(self) -> str:
        """Alias for sub - the Supabase user ID."""
        return self.sub
