Interface McpAuthHandler
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Handles MCP OAuth requests from the runtime.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionhandle(McpAuthRequest request, McpAuthInvocation invocation) Handles an MCP OAuth request.default CompletableFuture<McpAuthResponse> handleWithRuntimeRefresh(McpAuthRequest request, McpAuthInvocation invocation, boolean runtimeRefreshSupported) Handles an OAuth request with an optional runtime-owned refresh capability.
-
Method Details
-
handle
Handles an MCP OAuth request.- Parameters:
request- the MCP OAuth request detailsinvocation- the invocation context with session information- Returns:
- a future resolving to token data or cancellation
-
handleWithRuntimeRefresh
default CompletableFuture<McpAuthResponse> handleWithRuntimeRefresh(McpAuthRequest request, McpAuthInvocation invocation, boolean runtimeRefreshSupported) Handles an OAuth request with an optional runtime-owned refresh capability. The default preserves the legacy handler. An adopting host must choose an eligible advertised Refresh before callinghandle(McpAuthRequest, McpAuthInvocation); do not first schedule legacy detached recovery and then convert its cancellation.- Parameters:
request- the unchanged legacy requestinvocation- the invocation contextruntimeRefreshSupported- whether this request advertises refresh handoff; omission is false- Returns:
- a future resolving to a legacy response or runtime refresh
-