Package org.apache.juneau.examples.mcp.secured
package org.apache.juneau.examples.mcp.secured
-
ClassesClassDescriptionA minimal, self-contained, in-process stand-in for a real OAuth 2.1 authorization server (AS), so the
securedMCP example (and its end-to-end test) run entirely offline — no external IdP, no network access, no pre-shared secrets checked into source control.A guided walkthrough of callingSecuredExampleMcpServer, showing the secured request/response cycle a newcomer to MCP OAuth 2.1 needs to see: a rejected unauthenticated call (twice — once at the raw wire level, once through the realMcpClientSDK), the full RFC 9728 → RFC 8414 discovery chain, a successful read-only call, a scoped step-up rejection, and finally a successful write once a token carrying the write scope has been acquired.The OAuth 2.1-secured variant ofExampleMcpServer: identical notes-service surface (tools, prompt, resources, resource template, subscriptions), but everyPOST /JSON-RPC call now requires a valid bearer token.BootsSecuredExampleMcpServeron an embedded Jetty server, alongside an in-processOfflineAuthorizationServerthat stands in for a real OAuth 2.1 authorization server.