Coverage for postrfp/shared/serial/authmodels.py: 100%

16 statements  

« prev     ^ index     » next       coverage.py v7.11.0, created at 2025-10-22 21:34 +0000

1from pydantic import BaseModel 

2from pydantic.types import StringConstraints 

3 

4 

5from typing import Annotated 

6 

7 

8class UserDoc(BaseModel): 

9 user_id: Annotated[str, StringConstraints(max_length=50)] 

10 

11 

12class Login(UserDoc): 

13 password: Annotated[str, StringConstraints(max_length=256)] 

14 

15 

16class ResetDoc(UserDoc): 

17 new_password: Annotated[str, StringConstraints(max_length=256)] 

18 key: Annotated[str, StringConstraints(max_length=256)] 

19 

20 

21class Token(BaseModel): 

22 access_token: str 

23 token_type: str = "Bearer" 

24 expires_in: int 

25 

26 

27class RefreshRequest(BaseModel): 

28 refresh_token: str