MCPcopy
hub / github.com/pallets/werkzeug / __call__

Method __call__

examples/httpbasicauth.py:28–35  ·  view source on GitHub ↗
(self, environ, start_response)

Source from the content-addressed store, hash-verified

26 return Response(f"Logged in as {request.authorization.username}")
27
28 def __call__(self, environ, start_response):
29 request = Request(environ)
30 auth = request.authorization
31 if not auth or not self.check_auth(auth.username, auth.password):
32 response = self.auth_required(request)
33 else:
34 response = self.dispatch_request(request)
35 return response(environ, start_response)
36
37
38if __name__ == "__main__":

Callers

nothing calls this directly

Calls 4

check_authMethod · 0.95
auth_requiredMethod · 0.95
dispatch_requestMethod · 0.95
RequestClass · 0.90

Tested by

no test coverage detected