mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2025-11-01 18:48:14 +08:00
21 lines
509 B
Python
21 lines
509 B
Python
from typing import Callable
|
|
|
|
from starlette.responses import Response
|
|
|
|
from fastapi_users.db import BaseUserDatabase
|
|
from fastapi_users.models import UserDB
|
|
|
|
|
|
class BaseAuthentication:
|
|
|
|
userDB: BaseUserDatabase
|
|
|
|
def __init__(self, userDB: BaseUserDatabase):
|
|
self.userDB = userDB
|
|
|
|
async def get_login_response(self, user: UserDB, response: Response):
|
|
raise NotImplementedError()
|
|
|
|
def get_authentication_method(self) -> Callable[..., UserDB]:
|
|
raise NotImplementedError()
|