MCPcopy
hub / github.com/mitmproxy/mitmproxy / auth_cookie

Method auth_cookie

test/mitmproxy/tools/web/test_app.py:83–89  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

81
82 @property
83 def auth_cookie(self) -> str:
84 auth_cookie = create_signed_value(
85 secret=self._app.settings["cookie_secret"],
86 name=self._app.settings["auth_cookie_name"](),
87 value=app.AuthRequestHandler.AUTH_COOKIE_VALUE,
88 ).decode()
89 return f"{self._app.settings['auth_cookie_name']()}={auth_cookie}"
90
91 def fetch(self, *args, **kwargs) -> httpclient.HTTPResponse:
92 kwargs.setdefault("headers", {}).setdefault("Cookie", self.auth_cookie)

Callers

nothing calls this directly

Calls 1

decodeMethod · 0.45

Tested by

no test coverage detected