MCPcopy
hub / github.com/fastapi/fastapi / make_not_authenticated_error

Method make_not_authenticated_error

fastapi/security/http.py:87–92  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

85 return {"WWW-Authenticate": f"{self.model.scheme.title()}"}
86
87 def make_not_authenticated_error(self) -> HTTPException:
88 return HTTPException(
89 status_code=HTTP_401_UNAUTHORIZED,
90 detail="Not authenticated",
91 headers=self.make_authenticate_headers(),
92 )
93
94 async def __call__(self, request: Request) -> HTTPAuthorizationCredentials | None:
95 authorization = request.headers.get("Authorization")

Callers 4

__call__Method · 0.95
__call__Method · 0.45
__call__Method · 0.45
__call__Method · 0.45

Calls 2

HTTPExceptionClass · 0.90

Tested by

no test coverage detected