from typing import Any

from pydantic import Field

from .. import model


class AuthorizationGrant(model.BaseModel):
    access_token: str
    refresh_token: str | None = None


class UserResource(model.BaseModel):
    email: str
    name: str


class TokenClaims(model.BaseModel):
    sub: str
    iss: str
    jti: str
    iat: int
    exp: int
    extra: dict[str, Any] = Field(default_factory=dict)
