MCPcopy
hub / github.com/fastapi/fastapi / check_api_key

Method check_api_key

fastapi/security/api_key.py:47–52  ·  view source on GitHub ↗
(self, api_key: str | None)

Source from the content-addressed store, hash-verified

45 )
46
47 def check_api_key(self, api_key: str | None) -> str | None:
48 if not api_key:
49 if self.auto_error:
50 raise self.make_not_authenticated_error()
51 return None
52 return api_key
53
54
55class APIKeyQuery(APIKeyBase):

Callers 3

__call__Method · 0.80
__call__Method · 0.80
__call__Method · 0.80

Calls 1

Tested by

no test coverage detected