Hayden 177a430d8c
Feature/new-login-page (#989)
* login page refresh

* use user_id for token identification
2022-02-22 11:36:58 -09:00

15 lines
304 B
Python

from typing import Optional
from pydantic import UUID4, BaseModel
from pydantic.types import constr
class Token(BaseModel):
access_token: str
token_type: str
class TokenData(BaseModel):
user_id: Optional[UUID4]
username: Optional[constr(to_lower=True, strip_whitespace=True)] = None