Spaces:
Runtime error
Runtime error
File size: 597 Bytes
2ecc792 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
from pydantic import BaseModel, Field, EmailStr
from typing import Union, List, Tuple
from .generic import Base
class TokenSchema(Base):
access_token: str
refresh_token: str
class UserAuth(Base):
username: str = Field(..., description="username")
password: str = Field(..., min_length=5, max_length=24, description="user password")
email: EmailStr
class User(Base):
username: str
email: EmailStr
class TokenPayload(Base):
sub: str = None
exp: int = None
class LoginCreds(Base):
username: str
password: str
class APIKey(Base):
api_key: str |