feat: first commit, auth
This commit is contained in:
11
schemas/jwt.py
Normal file
11
schemas/jwt.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from datetime import UTC, datetime
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from schemas.providers import ProvidersType
|
||||
|
||||
|
||||
class JWTPayload(BaseModel):
|
||||
sub: int = Field(description="User ID")
|
||||
iss: ProvidersType = Field(description="Issuer")
|
||||
exp: float = Field(default_factory=lambda: datetime.now(UTC).timestamp())
|
||||
Reference in New Issue
Block a user