Move validate_password into UserManager

This commit is contained in:
François Voron
2021-09-14 14:01:57 +02:00
parent fdc8e54253
commit 480a6bc4df
19 changed files with 107 additions and 116 deletions

View File

@ -9,7 +9,7 @@ from fastapi_users.manager import UserManager
T = TypeVar("T")
class BaseAuthentication(Generic[T]):
class BaseAuthentication(Generic[T, models.UC, models.UD]):
"""
Base authentication backend.
@ -28,7 +28,7 @@ class BaseAuthentication(Generic[T]):
self.logout = logout
async def __call__(
self, credentials: Optional[T], user_manager: UserManager[models.UD]
self, credentials: Optional[T], user_manager: UserManager[models.UC, models.UD]
) -> Optional[models.UD]:
raise NotImplementedError()