Make ID a generic instead of forcing UUIDs

This commit is contained in:
François Voron
2022-05-01 11:18:27 +02:00
parent 87ac51a7bd
commit 7093c9e38a
25 changed files with 143 additions and 123 deletions

View File

@ -33,7 +33,7 @@ class AuthenticationBackend(Generic[models.UP]):
self,
name: str,
transport: Transport,
get_strategy: DependencyCallable[Strategy[models.UP]],
get_strategy: DependencyCallable[Strategy[models.UP, models.ID]],
):
self.name = name
self.transport = transport
@ -41,7 +41,7 @@ class AuthenticationBackend(Generic[models.UP]):
async def login(
self,
strategy: Strategy[models.UP],
strategy: Strategy[models.UP, models.ID],
user: models.UP,
response: Response,
) -> Any:
@ -50,7 +50,7 @@ class AuthenticationBackend(Generic[models.UP]):
async def logout(
self,
strategy: Strategy[models.UP],
strategy: Strategy[models.UP, models.ID],
user: models.UP,
token: str,
response: Response,