Remove Context.client_id (#3167)
This commit is contained in:
parent
0cb920f126
commit
5dd062d077
1 changed files with 21 additions and 11 deletions
|
|
@ -54,7 +54,6 @@ class Context(BaseModel, Generic[LifespanContextT, RequestT]):
|
|||
|
||||
# Get request info
|
||||
request_id = ctx.request_id
|
||||
client_id = ctx.client_id
|
||||
|
||||
return str(x)
|
||||
```
|
||||
|
|
@ -275,16 +274,6 @@ class Context(BaseModel, Generic[LifespanContextT, RequestT]):
|
|||
related_request_id=self.request_id,
|
||||
)
|
||||
|
||||
# TODO(maxisbey): see if this is needed otherwise remove
|
||||
@property
|
||||
def client_id(self) -> str | None:
|
||||
"""Get the client ID if available.
|
||||
|
||||
Note: this reads from the MCP request's `_meta` params, not the OAuth
|
||||
bearer token. For that, use `get_access_token().client_id`.
|
||||
"""
|
||||
return self.request_context.meta.get("client_id") if self.request_context.meta else None # pragma: no cover
|
||||
|
||||
@property
|
||||
def headers(self) -> Mapping[str, str] | None:
|
||||
"""Request headers carried by this message, when the transport has them.
|
||||
|
|
|
|||
Loading…
Reference in a new issue