mirror of
https://github.com/fastapi/fastapi.git
synced 2026-04-10 18:08:08 -04:00
✨ Add parameter dependencies to path operation decorators and include_router (#235)
* ✨ Implement dependencies in decorator and .include_router * 📝 Add docs for parameter dependencies * ✅ Add tests for dependencies parameter * 🔥 Remove debugging prints in tests * 📝 Update release notes
This commit is contained in:
committed by
GitHub
parent
7c50025c47
commit
e92b43b5c8
@@ -244,3 +244,7 @@ The most secure is the code flow, but is more complex to implement as it require
|
||||
But in the end, they are implementing the same OAuth2 standard.
|
||||
|
||||
**FastAPI** includes utilities for all these OAuth2 authentication flows in `fastapi.security.oauth2`.
|
||||
|
||||
## `Security` in decorator `dependencies`
|
||||
|
||||
The same way you can define a `list` of <a href="https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-in-decorator/" target="_blank">`Depends` in the decorator's `dependencies` parameter</a>, you could also use `Security` with `scopes` there.
|
||||
|
||||
Reference in New Issue
Block a user