claims.py 334 B

12345678910111213141516171819202122
  1. from typing import FrozenSet
  2. from typing import Optional
  3. from clean_python import ValueObject
  4. __all__ = ["Claims"]
  5. class Tenant(ValueObject):
  6. id: int
  7. name: str
  8. class User(ValueObject):
  9. id: str
  10. name: Optional[str]
  11. class Claims(ValueObject):
  12. user: User
  13. tenant: Optional[Tenant]
  14. scope: FrozenSet[str]