mirror of
https://github.com/fastapi/fastapi.git
synced 2026-05-12 01:31:03 -04:00
📝 Replace email with username in docs_src/security/tutorial007 code examples (#10649)
This commit is contained in:
@@ -22,7 +22,7 @@ def get_current_username(credentials: HTTPBasicCredentials = Depends(security)):
|
||||
if not (is_correct_username and is_correct_password):
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_401_UNAUTHORIZED,
|
||||
detail="Incorrect email or password",
|
||||
detail="Incorrect username or password",
|
||||
headers={"WWW-Authenticate": "Basic"},
|
||||
)
|
||||
return credentials.username
|
||||
|
||||
Reference in New Issue
Block a user