Files
malenia-backend/schemas/jwt.py
hexdev 9187fbb970 feat(auth): implement JWT TTL and expiration
added access_token_ttl setting
fixed public and private key mismatch while decoding jwt
decode_jwt now returns None on expired tokens instead of raising exc
generate_pair converts sub to string and uses dynamic expiration
2026-07-24 12:59:41 +07:00

11 lines
288 B
Python

from pydantic import BaseModel, Field
from core.exp import get_exp
from schemas.providers import ProvidersType
class JWTPayload(BaseModel):
sub: str = Field(description="User ID")
iss: ProvidersType = Field(description="Issuer")
exp: float = Field(default_factory=get_exp)