Coverage for src/cstlcore/models/token.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v7.9.1, created at 2026-02-19 12:46 +0000

1import uuid 

2 

3from pydantic import BaseModel, Field 

4 

5 

6class Token(BaseModel): 

7 access_token: str = Field(..., description="The access token issued to the user") 

8 token_type: str = "bearer" 

9 

10 

11class TokenData(BaseModel): 

12 """ 

13 Data structure for token payload. 

14 Contains the user ID and optionally the email. 

15 """ 

16 

17 id: uuid.UUID = Field(..., description="The unique identifier of the user")