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

Method handler

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

Source from the content-addressed store, hash-verified

2474 return AccessToken(token="tok-2" if any(self.forced) else "tok-1", expires_at=None)
2475
2476 def handler(self, request: httpx2.Request) -> httpx2.Response:
2477 authorization = request.headers.get("X-Forwarded-Authorization") or request.headers.get("Authorization")
2478 if authorization == f"Bearer {self.valid}":
2479 return _message_response()
2480 return httpx2.Response(401, json={"error": "revoked"}, headers={"retry-after-ms": "1"})
2481
2482
2483def _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