FastAPI · Class
HTTPBasic
HTTPBasic adds HTTP Basic authentication as a FastAPI dependency. It parses the request credentials and returns HTTPBasicCredentials, or rejects missing credentials with a 401 response by default.
Last updated
Syntax
HTTPBasic(*, scheme_name=None, realm=None, description=None, auto_error=True)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
HTTPBasicCredentialsHTTPBearerHTTPDigestHTTPAuthorizationCredentialsDependsSecurity