Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use 401 with WWW-Authenticate for OAuth2 and scope_str #188

Merged
merged 1 commit into from
Apr 27, 2019

Conversation

tiangolo
Copy link
Owner

✨ Use 401 UNAUTHORIZED status codes with WWW-Authenticate headers for OAuth2 with bearer tokens.

Update, improve and simplify all the security docs.

Add scope_str to SecurityScopes to simplify injecting it in WWW-Authenticate headers.

Update tests.

@codecov
Copy link

codecov bot commented Apr 27, 2019

Codecov Report

Merging #188 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #188   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files         170    170           
  Lines        4092   4122   +30     
=====================================
+ Hits         4092   4122   +30
Impacted Files Coverage Δ
docs/src/security/tutorial003.py 100% <100%> (ø) ⬆️
...ts/test_tutorial/test_security/test_tutorial003.py 100% <100%> (ø) ⬆️
...ts/test_tutorial/test_security/test_tutorial005.py 100% <100%> (ø) ⬆️
docs/src/security/tutorial001.py 100% <100%> (ø) ⬆️
docs/src/security/tutorial005.py 100% <100%> (ø) ⬆️
fastapi/security/oauth2.py 100% <100%> (ø) ⬆️
...ts/test_tutorial/test_security/test_tutorial001.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9a9bfd7...04d2d4a. Read the comment docs.

@tiangolo tiangolo merged commit 3797c04 into master Apr 27, 2019
@tiangolo tiangolo deleted the oauth2-www-authenticate branch April 27, 2019 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant