Define Response schemas specific to the Auth system.
# Source: https://github.com/seapagan/fastapi-template | License: MIT | Copyright 2022 - 2026 Grant Ramsay
# Provided via justclaw.it.com; keep this notice with the code.
"""Define Response schemas specific to the Auth system."""
from pydantic import BaseModel
class TokenResponse(BaseModel):
"""Response Schema for Register/Login routes.
This returns a JWT token and a Refresh token.
"""
token: str
refresh: str
class TokenRefreshResponse(BaseModel):
"""Return a new JWT only, after a refresh request."""
token: str
class PasswordResetResponse(BaseModel):
"""Response schema for password reset operations."""
message: str
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key