Add a name on every route #762 (#774)

* Names for urls added

* Tests for Login/Logout Names

* Register Name Test

* tests/test_router_reset.py

* Tests to verify url names in users router

* Test Verify Router Names

* oauth routes updated with prefix

* Test for authorize.  Didn't right test for callback as covered under other tests
This commit is contained in:
Brandon H. Goding
2021-11-02 03:12:43 -04:00
committed by GitHub
parent e0e8dfbc3b
commit 0c45cbc179
12 changed files with 137 additions and 11 deletions

View File

@ -19,7 +19,7 @@ def get_auth_router(
active=True, verified=requires_verification
)
@router.post("/login")
@router.post("/login", name="auth:login")
async def login(
response: Response,
credentials: OAuth2PasswordRequestForm = Depends(),
@ -41,7 +41,7 @@ def get_auth_router(
if backend.logout:
@router.post("/logout")
@router.post("/logout", name="auth:logout")
async def logout(
response: Response,
user=Depends(get_current_user),