__call__() — fastapi Function Reference
Architecture documentation for the __call__() function in http.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 1cc0e9d7_5f1e_8998_ada2_046b7c502577["__call__()"] 787896c0_cb31_1b11_93c2_5e2fac3ff58e["HTTPDigest"] 1cc0e9d7_5f1e_8998_ada2_046b7c502577 -->|defined in| 787896c0_cb31_1b11_93c2_5e2fac3ff58e 8a4f3cb1_2bb3_9484_ab7e_5424511db588["make_not_authenticated_error()"] 1cc0e9d7_5f1e_8998_ada2_046b7c502577 -->|calls| 8a4f3cb1_2bb3_9484_ab7e_5424511db588 21dea0a2_f30d_d3da_ce48_734fa9836d52["get_authorization_scheme_param()"] 1cc0e9d7_5f1e_8998_ada2_046b7c502577 -->|calls| 21dea0a2_f30d_d3da_ce48_734fa9836d52 style 1cc0e9d7_5f1e_8998_ada2_046b7c502577 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
fastapi/security/http.py lines 408–423
async def __call__(
self, request: Request
) -> Optional[HTTPAuthorizationCredentials]:
authorization = request.headers.get("Authorization")
scheme, credentials = get_authorization_scheme_param(authorization)
if not (authorization and scheme and credentials):
if self.auto_error:
raise self.make_not_authenticated_error()
else:
return None
if scheme.lower() != "digest":
if self.auto_error:
raise self.make_not_authenticated_error()
else:
return None
return HTTPAuthorizationCredentials(scheme=scheme, credentials=credentials)
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does __call__() do?
__call__() is a function in the fastapi codebase, defined in fastapi/security/http.py.
Where is __call__() defined?
__call__() is defined in fastapi/security/http.py at line 408.
What does __call__() call?
__call__() calls 2 function(s): get_authorization_scheme_param, make_not_authenticated_error.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free