FastAPI · Class
HTTPBearer
HTTPBearer reads a Bearer token from the Authorization header. Use it as a FastAPI dependency to receive the scheme and token in an HTTPAuthorizationCredentials object.
Last updated
- Since
- 0.122.0
Syntax
HTTPBearer(*, bearerFormat=None, scheme_name=None, description=None, auto_error=True)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
HTTPAuthorizationCredentialsOAuth2HTTPBasicHTTPDigestSecurityScopes