Convert the payload to a dictionary format.
(cls, v)
| 58 | @pydantic.field_validator("payload", mode="before") |
| 59 | @classmethod |
| 60 | def format_payload(cls, v): |
| 61 | """Convert the payload to a dictionary format.""" |
| 62 | assert isinstance(v, JWTPayload) |
| 63 | return v.asdict() |
| 64 | |
| 65 | |
| 66 | @router.post("/auth/token") |