We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2006ea commit 2a4dc97Copy full SHA for 2a4dc97
app/library/auth.py
@@ -51,7 +51,7 @@ def check_auth(
51
db, user_name=credentials.username, password=credentials.password
52
)
53
if not user:
54
- raise HTTPException(status_code=400, detail="Incorrect email or password")
+ raise HTTPException(status_code=401, detail="Incorrect email or password", headers={"WWW-Authenticate": "Basic"})
55
elif not crud_user.is_active(user):
56
raise HTTPException(status_code=400, detail="Inactive user")
57
return credentials.username
0 commit comments