MCPcopy
hub / github.com/opentrace/opentrace / _OAuthResult

Class _OAuthResult

agent/src/opentrace_agent/cli/auth.py:205–219  ·  view source on GitHub ↗

Thread-safe container for the OAuth callback result.

Source from the content-addressed store, hash-verified

203
204
205class _OAuthResult:
206 """Thread-safe container for the OAuth callback result."""
207
208 def __init__(self) -> None:
209 self.code: str | None = None
210 self.error: str | None = None
211 self.ready = threading.Event()
212
213 def set_code(self, code: str) -> None:
214 self.code = code
215 self.ready.set()
216
217 def set_error(self, error: str) -> None:
218 self.error = error
219 self.ready.set()
220
221
222def _make_handler(result: _OAuthResult, expected_state: str) -> type[BaseHTTPRequestHandler]:

Callers 1

loginFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected