Fix #515: remove calls to deprecated user callables in internal codebase

This commit is contained in:
François Voron
2021-03-04 17:50:19 +01:00
parent c41b4d1bd4
commit 8eb53f4744
3 changed files with 14 additions and 13 deletions

View File

@ -15,10 +15,9 @@ def get_auth_router(
) -> APIRouter:
"""Generate a router with login/logout routes for an authentication backend."""
router = APIRouter()
if requires_verification:
get_current_user = authenticator.get_current_verified_user
else:
get_current_user = authenticator.get_current_active_user
get_current_user = authenticator.current_user(
active=True, verified=requires_verification
)
@router.post("/login")
async def login(