MCPcopy Index your code
hub / github.com/fastapi/fastapi / __call__

Method __call__

fastapi/security/http.py:94–102  ·  view source on GitHub ↗
(self, request: Request)

Source from the content-addressed store, hash-verified

92 )
93
94 async def __call__(self, request: Request) -> HTTPAuthorizationCredentials | None:
95 authorization = request.headers.get("Authorization")
96 scheme, credentials = get_authorization_scheme_param(authorization)
97 if not (authorization and scheme and credentials):
98 if self.auto_error:
99 raise self.make_not_authenticated_error()
100 else:
101 return None
102 return HTTPAuthorizationCredentials(scheme=scheme, credentials=credentials)
103
104
105class HTTPBasic(HTTPBase):

Callers

nothing calls this directly

Calls 4

getMethod · 0.45

Tested by

no test coverage detected