Uses of Package
org.apache.juneau.rest.client.mcp.auth
Packages that use org.apache.juneau.rest.client.mcp.auth
Package
Description
Client-side OAuth 2.1 token acquisition for the Model Context Protocol
2026-07-28 revision.-
Classes in org.apache.juneau.rest.client.mcp.auth used by org.apache.juneau.rest.client.mcp.authClassDescriptionSingle-use, TTL-bounded store for the per-authorization
state→(codeVerifier, expectedIssuer)association created when an interactive authorization-code + PKCE flow is started and consumed when the loopback redirect arrives.A pending-authorization association awaiting the IdP loopback callback.A minimal loopback (http://127.0.0.1) HTTP listener that captures the single authorization-code redirect an IdP sends back to a native/CLI OAuth client (SEP-837 loopback redirect handling).The OIDC Dynamic Client Registrationapplication_type(SEP-837) declared by an MCP client when it registers with an authorization server.Interactive authorization-code + PKCE (S256) token acquisition for headless / CLI use.Builder.Immutable result of a Dynamic Client Registration (SEP-837) round-trip — the client credentials and metadata an authorization server issued, keyed by the ASissuerfor SEP-2352 credential binding.Orchestrates SEP-2352 registration-mechanism selection, issuer-keying, and re-registration on authorization-server migration, returning a usableMcpClientRegistrationfor a discovered AS.Builder.SEP-2352 optional persistence SPI for Dynamic-Client-Registration / pre-registered credentials, keyed by the authorization server'sissueridentifier.Performs an RFC 7591 / OpenID Connect Dynamic Client Registration (SEP-837) round-trip against an authorization server'sregistration_endpoint, returning the issued credentials as a redaction-safeMcpClientRegistrationkeyed by the ASissuer(the SEP-2352 binding key).Builder.Signals that an MCP call was rejected with a SEP-2350401/403 insufficient_scopestep-up challenge.Immutable view of an RFC 9728 Protected Resource Metadata (PRM) document, as an MCP client consumes it to discover which authorization server(s) protect a given MCP server.Fetches and parses an RFC 9728 Protected Resource Metadata (PRM) document, and resolves the authorization server a protected MCP resource delegates to.Builder.Computes and tracks the SEP-2350 step-up scope union — the set of scopes a client re-authorizes with after a server emits a per-operationinsufficient_scopechallenge.Client-side SEP-2350 step-up state machine: wraps an MCP call so that, on a401/403 insufficient_scopechallenge, it computes the required-scope union (McpScopeAccumulator), drives (re-)authorization via a caller-suppliedMcpStepUpAuthorizer.Reauthorizer, and retries the original call — bounded by a hard attempt cap with per-(resource, operation)attempt tracking so a misconfigured server can't drive an unbounded re-authorization loop (spec "no more than a few times").Builder.Drives (re-)authorization with the computed scope union and installs the resulting token.A caller-supplied MCP call that throwsMcpInsufficientScopeExceptionon a step-up challenge.A headless bearer-token provider that feeds theMcpAuthInterceptortoken seam (Supplier<String>).Builder.A parsedWWW-Authenticate: Bearer ...challenge as returned by an OAuth 2.1 / MCP resource server on a401/403response (RFC 6750 §3, RFC 9728 §5.1).