FastAPI · Class
OAuth2AuthorizationCodeBearer
OAuth2AuthorizationCodeBearer defines an OAuth2 authorization-code flow with bearer tokens. Use its instance as a FastAPI dependency and expose the scheme in OpenAPI documentation.
Last updated
Syntax
OAuth2AuthorizationCodeBearer(authorizationUrl, tokenUrl, refreshUrl=None, scheme_name=None, scopes=None, description=None, auto_error=True)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
OAuth2OAuth2PasswordBearerSecurityScopesSecurityHTTPAuthorizationCredentials