Skip to content

Commit

Permalink
Update authentication.py
Browse files Browse the repository at this point in the history
added None return type hint
  • Loading branch information
floschne authored Aug 23, 2024
1 parent 0226b04 commit 87964d8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions backend/src/api/endpoints/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def logout(
db: Session = Depends(get_db_session),
dto: RefreshAccessTokenData = Depends(),
response: Response,
):
) -> None:
token = crud_refresh_token.read_and_verify(db, dto.refresh_token)
crud_refresh_token.revoke(db, token)
response.delete_cookie(AUTHORIZATION, secure=True, httponly=True, samesite="strict")
Expand Down Expand Up @@ -139,7 +139,8 @@ async def auth_content(
request: Request,
db: Session = Depends(get_db_session),
x_original_uri: Annotated[str | None, Header()] = None,
):
) -> None:
# returns None on purpose
token = request.cookies[AUTHORIZATION]
a = AuthzUser(request, get_current_user(db, token), db)
if not x_original_uri.startswith(CONTENT_PREFIX):
Expand Down

0 comments on commit 87964d8

Please sign in to comment.