"""Core data models for the Conduit auth module."""

from dataclasses import dataclass, field


@dataclass
class AuthenticatedUser:
    """Represents a user authenticated via Entra ID.

    Fields map to Entra ID token claims:
    - tenant_id: tid claim (which Azure AD tenant the user belongs to)
    - user_id: oid claim (user's object ID within their tenant)
    - email: preferred_username claim
    - display_name: name claim
    - roles: app roles assigned in Entra ID (if configured)
    - raw_claims: full decoded JWT for app-specific use
    """

    tenant_id: str
    user_id: str
    email: str
    display_name: str
    roles: list[str] = field(default_factory=list)
    raw_claims: dict = field(default_factory=dict)
