mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2025-10-27 19:15:40 +08:00
Drop Pydantic v1 support
This commit is contained in:
@ -8,7 +8,6 @@ from fastapi_users.authentication.transport.base import (
|
||||
TransportLogoutNotSupportedError,
|
||||
)
|
||||
from fastapi_users.openapi import OpenAPIResponseType
|
||||
from fastapi_users.schemas import model_dump
|
||||
|
||||
|
||||
class BearerResponse(BaseModel):
|
||||
@ -24,7 +23,7 @@ class BearerTransport(Transport):
|
||||
|
||||
async def get_login_response(self, token: str) -> Response:
|
||||
bearer_response = BearerResponse(access_token=token, token_type="bearer")
|
||||
return JSONResponse(model_dump(bearer_response))
|
||||
return JSONResponse(bearer_response.model_dump())
|
||||
|
||||
async def get_logout_response(self) -> Response:
|
||||
raise TransportLogoutNotSupportedError()
|
||||
|
||||
Reference in New Issue
Block a user