25 lines
564 B
Python
25 lines
564 B
Python
"""Application DTOs for Identity — the inputs/outputs of use cases (not API schemas)."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from dataclasses import dataclass
|
|
|
|
from src.domain.identity.entities import User
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
class LoginCommand:
|
|
email: str
|
|
password: str
|
|
client_ip: str
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
class AuthenticatedUser:
|
|
"""Result of a successful authentication. The API layer assembles the public
|
|
response (incl. staff profile) from this + a profile read."""
|
|
|
|
user: User
|
|
roles: list[str]
|
|
access_token: str
|