MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / handler

Method handler

tests/lib/test_credentials.py:2504–2508  ·  view source on GitHub ↗
(self, request: httpx2.Request)

Source from the content-addressed store, hash-verified

2502 return AccessToken(token="tok-2" if any(self.forced) else "tok-1", expires_at=None)
2503
2504 def handler(self, request: httpx2.Request) -> httpx2.Response:
2505 authorization = request.headers.get("X-Forwarded-Authorization") or request.headers.get("Authorization")
2506 if authorization == f"Bearer {self.valid}":
2507 return _message_response()
2508 return httpx2.Response(401, json={"error": "revoked"}, headers={"retry-after-ms": "1"})
2509
2510
2511def _move_authorization(request: httpx2.Request) -> None:

Callers

nothing calls this directly

Calls 2

_message_responseFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected