MCPcopy Create free account
hub / github.com/github/copilot-sdk / MCPOauthPendingRequestResponse

Class MCPOauthPendingRequestResponse

python/copilot/generated/rpc.py:12013–12044  ·  view source on GitHub ↗

Host response to the pending OAuth request.

Source from the content-addressed store, hash-verified

12011# Experimental: this type is part of an experimental API and may change or be removed.
12012@dataclass
12013class MCPOauthPendingRequestResponse:
12014 """Host response to the pending OAuth request."""
12015
12016 kind: MCPOauthPendingRequestResponseKind
12017 access_token: str | None = None
12018 """Access token acquired by the SDK host"""
12019
12020 expires_in: int | None = None
12021 """Token lifetime in seconds, if known."""
12022
12023 token_type: str | None = None
12024 """OAuth token type. Defaults to Bearer when omitted."""
12025
12026 @staticmethod
12027 def from_dict(obj: Any) -> 'MCPOauthPendingRequestResponse':
12028 assert isinstance(obj, dict)
12029 kind = MCPOauthPendingRequestResponseKind(obj.get("kind"))
12030 access_token = from_union([from_str, from_none], obj.get("accessToken"))
12031 expires_in = from_union([from_int, from_none], obj.get("expiresIn"))
12032 token_type = from_union([from_str, from_none], obj.get("tokenType"))
12033 return MCPOauthPendingRequestResponse(kind, access_token, expires_in, token_type)
12034
12035 def to_dict(self) -> dict:
12036 result: dict = {}
12037 result["kind"] = to_enum(MCPOauthPendingRequestResponseKind, self.kind)
12038 if self.access_token is not None:
12039 result["accessToken"] = from_union([from_str, from_none], self.access_token)
12040 if self.expires_in is not None:
12041 result["expiresIn"] = from_union([from_int, from_none], self.expires_in)
12042 if self.token_type is not None:
12043 result["tokenType"] = from_union([from_str, from_none], self.token_type)
12044 return result
12045
12046# Experimental: this type is part of an experimental API and may change or be removed.
12047@dataclass

Callers 2

from_dictMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…