first commit
This commit is contained in:
22
backend/app/schemas/token.py
Normal file
22
backend/app/schemas/token.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class Token(BaseModel):
|
||||
access_token: str
|
||||
token_type: str = "bearer"
|
||||
expires_in: int
|
||||
user: dict
|
||||
|
||||
|
||||
class TokenPayload(BaseModel):
|
||||
sub: int
|
||||
exp: datetime
|
||||
type: str
|
||||
|
||||
|
||||
class TokenRefresh(BaseModel):
|
||||
access_token: str
|
||||
expires_in: int
|
||||
Reference in New Issue
Block a user