(token: Annotated[str, Depends(oauth2_scheme)])
| 56 | |
| 57 | |
| 58 | async def get_current_user(token: Annotated[str, Depends(oauth2_scheme)]): |
| 59 | user = fake_decode_token(token) |
| 60 | if not user: |
| 61 | raise HTTPException( |
| 62 | status_code=status.HTTP_401_UNAUTHORIZED, |
| 63 | detail="Not authenticated", |
| 64 | headers={"WWW-Authenticate": "Bearer"}, |
| 65 | ) |
| 66 | return user |
| 67 | |
| 68 | |
| 69 | async def get_current_active_user( |
nothing calls this directly
no test coverage detected
searching dependent graphs…