Class SessionMcpOauthApi
mcp.oauth namespace.- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionNotifies the session that MCP OAuth authentication succeeded and updated credentials were persisted, so cached tool definitions can be refreshed.Cancels the exact owned OAuth login issued to this original session requester, without clearing shared credentials.Completes a runtime-managed MCP OAuth login after the authorization server redirects to a host-managed callback URL.Resolves a pending MCP OAuth request with a host-provided token or cancellation.login(SessionMcpOauthLoginParams params) Starts OAuth authentication for a remote MCP server.login(SessionMcpOauthLoginRequest request) Starts OAuth authentication for a remote MCP server.Prepares an inert, expiring owned OAuth login bound to the original session requester and exact installation.probe(SessionMcpOauthProbeParams params) Passively probes a configured remote MCP server to classify whether OAuth is required or a cached/override token is accepted.probe(SessionMcpOauthProbeRequest request) Passively probes a configured remote MCP server to classify whether OAuth is required or a cached/override token is accepted.respond(SessionMcpOauthRespondParams params) Responds to a pending MCP OAuth authorization request by its request id.
-
Method Details
-
handlePendingRequest
@CopilotExperimental public CompletableFuture<SessionMcpOauthHandlePendingRequestResult> handlePendingRequest(SessionMcpOauthHandlePendingRequestParams params) Resolves a pending MCP OAuth request with a host-provided token or cancellation. The pending request is emitted as mcp.oauth_required with the data necessary to authorize the request.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
authenticationStateChanged
@CopilotExperimental public CompletableFuture<Void> authenticationStateChanged(SessionMcpOauthAuthenticationStateChangedParams params) Notifies the session that MCP OAuth authentication succeeded and updated credentials were persisted, so cached tool definitions can be refreshed.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
prepareLogin
@CopilotExperimental public CompletableFuture<SessionMcpOauthPrepareLoginResult> prepareLogin(SessionMcpOauthPrepareLoginParams params) Prepares an inert, expiring owned OAuth login bound to the original session requester and exact installation. Does not activate, connect, read credentials or open a browser.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
login
@CopilotExperimental public CompletableFuture<SessionMcpOauthLoginResult> login(SessionMcpOauthLoginParams params) Starts OAuth authentication for a remote MCP server. Owned servers require the original one-use prepareLogin handle and exact installation ID; manual servers retain the existing direct login behaviour.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
login
@CopilotExperimental public CompletableFuture<SessionMcpOauthLoginResult> login(SessionMcpOauthLoginRequest request) Starts OAuth authentication for a remote MCP server. Owned servers require the original one-use prepareLogin handle and exact installation ID; manual servers retain the existing direct login behaviour.Accepts the extensible request, including inputs added after the params record.
- Since:
- 1.0.0
-
complete
Completes a runtime-managed MCP OAuth login after the authorization server redirects to a host-managed callback URL.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
probe
@CopilotExperimental public CompletableFuture<McpOauthProbeResult> probe(SessionMcpOauthProbeParams params) Passively probes a configured remote MCP server to classify whether OAuth is required or a cached/override token is accepted. Does not start OAuth, emit pending OAuth requests, or mutate MCP connection state.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
probe
@CopilotExperimental public CompletableFuture<McpOauthProbeResult> probe(SessionMcpOauthProbeRequest request) Passively probes a configured remote MCP server to classify whether OAuth is required or a cached/override token is accepted. Does not start OAuth, emit pending OAuth requests, or mutate MCP connection state.Accepts the extensible request, including inputs added after the params record.
- Since:
- 1.0.0
-
cancelLogin
@CopilotExperimental public CompletableFuture<SessionMcpOauthCancelLoginResult> cancelLogin(SessionMcpOauthCancelLoginParams params) Cancels the exact owned OAuth login issued to this original session requester, without clearing shared credentials.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
respond
@CopilotExperimental public CompletableFuture<SessionMcpOauthRespondResult> respond(SessionMcpOauthRespondParams params) Responds to a pending MCP OAuth authorization request by its request id.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-