Class McpProtectedResourceMetadata

java.lang.Object
org.apache.juneau.rest.server.mcp.v20260728.McpProtectedResourceMetadata

Server-side representation of an RFC 9728 Protected Resource Metadata (PRM) document, emitted by the 2026-07-28 MCP resource server from its .well-known/oauth-protected-resource endpoint so a client can discover which authorization server(s) protect this MCP server.

The property namer maps the camel-case Java properties to the snake-case wire field names RFC 9728 mandates (resource, authorization_servers, scopes_supported, bearer_methods_supported), so Juneau bean serialization produces JSON that parses cleanly on the client side via org.apache.juneau.rest.client.mcp.auth.McpProtectedResourceMetadata / McpProtectedResourceMetadataClient.

Client/server split:

This intentionally duplicates the shape of the client-side org.apache.juneau.rest.client.mcp.auth.McpProtectedResourceMetadata record; the two live in different modules with different dependency footprints (the client parses via Nimbus; the server emits via Juneau marshalling). A shared, dependency-neutral bean may replace both later.

Since:
10.0.0
  • Constructor Details

  • Method Details

    • getResource

      public URI getResource()
      The resource field — this server's canonical resource identifier (RFC 9728 §2).
      Returns:
      The resource identifier, or null if not set.
    • setResource

      Sets the resource identifier.
      Parameters:
      value - The new value. Can be null to unset.
      Returns:
      This object (for method chaining).
    • getAuthorizationServers

      The authorization_servers field — the issuer URIs of the authorization servers that mint tokens for this resource (RFC 9728 §2).
      Returns:
      The authorization-server issuer URIs, or null if not set.
    • setAuthorizationServers

      Sets the authorization_servers list.
      Parameters:
      value - The new value. Can be null to unset.
      Returns:
      This object (for method chaining).
    • getScopesSupported

      The scopes_supported field — the OAuth scopes this resource understands (RFC 9728 §2).
      Returns:
      The supported scopes, or null if not set.
    • setScopesSupported

      Sets the scopes_supported set.
      Parameters:
      value - The new value. Can be null to unset.
      Returns:
      This object (for method chaining).
    • getBearerMethodsSupported

      The bearer_methods_supported field — the RFC 6750 methods by which a bearer token may be presented (RFC 9728 §2). This server accepts the header method only.
      Returns:
      The supported bearer methods, or null if not set.
    • setBearerMethodsSupported

      Sets the bearer_methods_supported set.
      Parameters:
      value - The new value. Can be null to unset.
      Returns:
      This object (for method chaining).