netadm/authentication/dependencies/backend.py

11 lines
328 B
Python
Raw Permalink Normal View History

2024-10-02 15:50:50 +00:00
from fastapi_users.authentication import AuthenticationBackend
from authentication.transport import bearer_transport
from authentication.strategy import get_database_strategy
authentication_backend = AuthenticationBackend(
name="access-tokens-db",
transport=bearer_transport,
get_strategy=get_database_strategy,
)