Browse Source

✏ Fix docstring typo for oauth2 utils (#1621)

pull/1704/head
tomarv2 5 years ago
committed by GitHub
parent
commit
ff6afeaf78
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      fastapi/security/oauth2.py

4
fastapi/security/oauth2.py

@ -15,7 +15,7 @@ class OAuth2PasswordRequestForm:
This is a dependency class, use it like:
@app.post("/login")
def login(form_data: Oauth2PasswordRequestForm = Depends()):
def login(form_data: OAuth2PasswordRequestForm = Depends()):
data = form_data.parse()
print(data.username)
print(data.password)
@ -65,7 +65,7 @@ class OAuth2PasswordRequestFormStrict(OAuth2PasswordRequestForm):
This is a dependency class, use it like:
@app.post("/login")
def login(form_data: Oauth2PasswordRequestFormStrict = Depends()):
def login(form_data: OAuth2PasswordRequestFormStrict = Depends()):
data = form_data.parse()
print(data.username)
print(data.password)

Loading…
Cancel
Save