Class McpClientRegistrations
McpClientRegistration) into the existing token flows —
the McpAuthorizationCodeAcquirer (interactive auth-code + PKCE) and McpTokenProvider
(client-credentials / refresh).
DCR changes only how the client_id/secret were obtained; it does not alter the resource=
(RFC 8707) or iss (RFC 9207 / SEP-2468) enforcement those flows already perform — the caller still sets
resource(...) / expectedIssuer(...) exactly as for a statically-configured client. These helpers only
transplant the DCR-issued credential material (and, for the acquirer, keep the loopback redirect path and port
consistent with what was registered, so a bind-first forPort registration matches
at a strict exact-match authorization server).
- Since:
- 10.0.0
-
Method Summary
Modifier and TypeMethodDescriptionconfigure(McpAuthorizationCodeAcquirer.Builder builder, McpClientRegistration registration) Applies a DCR-issued registration'sclient_id, optionalclient_secret, and registered loopback redirect path (and port, for a bind-first registration) onto anMcpAuthorizationCodeAcquirer.Builder.static McpTokenProvider.Builderconfigure(McpTokenProvider.Builder builder, McpClientRegistration registration) Applies a DCR-issued registration'sclient_idand optionalclient_secretonto anMcpTokenProvider.Builder(client-credentials / refresh modes).
-
Method Details
-
configure
public static McpAuthorizationCodeAcquirer.Builder configure(McpAuthorizationCodeAcquirer.Builder builder, McpClientRegistration registration) Applies a DCR-issued registration'sclient_id, optionalclient_secret, and registered loopback redirect path (and port, for a bind-first registration) onto anMcpAuthorizationCodeAcquirer.Builder.When the registration's first redirect URI carries an explicit port (a bind-first
forPortregistration), that port is wired onto the builder viaredirectPortso the loopback receiver binds exactly the port the authorization server was told; a port-agnostic registration leaves the acquirer on its ephemeral-port default.- Parameters:
builder- The acquirer builder. Must not benull .registration- The DCR-issued registration. Must not benull .- Returns:
- The same builder, for chaining.
-
configure
public static McpTokenProvider.Builder configure(McpTokenProvider.Builder builder, McpClientRegistration registration) Applies a DCR-issued registration'sclient_idand optionalclient_secretonto anMcpTokenProvider.Builder(client-credentials / refresh modes).- Parameters:
builder- The token-provider builder. Must not benull .registration- The DCR-issued registration. Must not benull .- Returns:
- The same builder, for chaining.
-