Start here. This is the direct spoken answer to practice first.
Overview
Uses FastAPI Security dependencies to combine declared scopes with current application authorization.
FastAPI's Security dependency can declare required OAuth2 scopes for a route and expose them through SecurityScopes to the validating dependency. I validate the token first, read its granted scopes, and reject the request when any required scope is missing. The route declares the capability it needs instead of repeating string checks in its body. Resource ownership or tenant access is still checked separately.