Skip to content
masterclass Buddy

FastAPI · Class

SecurityScopes

SecurityScopes gives a dependency the OAuth2 scopes required by the current dependency chain. Use its scopes list for checks and scope_str for a space-separated form.

Last updated

Syntax

SecurityScopes(scopes=None)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • Security
  • OAuth2
  • OAuth2PasswordBearer
  • SecurityScopes

Source: Security Tools - FastAPI. Checked 2026-11-03.