mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2025-08-15 19:30:47 +08:00
19 lines
526 B
Python
19 lines
526 B
Python
from typing import Callable
|
|
|
|
from starlette.responses import Response
|
|
|
|
from fastapi_users.db import BaseUserDatabase
|
|
from fastapi_users.models import BaseUserDB
|
|
|
|
|
|
class BaseAuthentication:
|
|
"""Base adapter for generating and decoding authentication tokens."""
|
|
|
|
async def get_login_response(self, user: BaseUserDB, response: Response):
|
|
raise NotImplementedError()
|
|
|
|
def get_authentication_method(
|
|
self, user_db: BaseUserDatabase
|
|
) -> Callable[..., BaseUserDB]:
|
|
raise NotImplementedError()
|