Class McpProtectedResourceMetadata
java.lang.Object
org.apache.juneau.rest.server.mcp.v20260728.McpProtectedResourceMetadata
@BeanType(propertyNamer=PropertyNamerULC.class)
public class McpProtectedResourceMetadata
extends Object
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionTheauthorization_serversfield — the issuer URIs of the authorization servers that mint tokens for this resource (RFC 9728 §2).Thebearer_methods_supportedfield — the RFC 6750 methods by which a bearer token may be presented (RFC 9728 §2).Theresourcefield — this server's canonical resource identifier (RFC 9728 §2).Thescopes_supportedfield — the OAuth scopes this resource understands (RFC 9728 §2).setAuthorizationServers(List<URI> value) Sets theauthorization_serverslist.setBearerMethodsSupported(Set<String> value) Sets thebearer_methods_supportedset.setResource(URI value) Sets theresourceidentifier.setScopesSupported(Set<String> value) Sets thescopes_supportedset.
-
Constructor Details
-
McpProtectedResourceMetadata
public McpProtectedResourceMetadata()
-
-
Method Details
-
getResource
Theresourcefield — this server's canonical resource identifier (RFC 9728 §2).- Returns:
- The resource identifier, or
null if not set.
-
setResource
Sets theresourceidentifier.- Parameters:
value- The new value. Can benull to unset.- Returns:
- This object (for method chaining).
-
getAuthorizationServers
Theauthorization_serversfield — 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 theauthorization_serverslist.- Parameters:
value- The new value. Can benull to unset.- Returns:
- This object (for method chaining).
-
getScopesSupported
Thescopes_supportedfield — the OAuth scopes this resource understands (RFC 9728 §2).- Returns:
- The supported scopes, or
null if not set.
-
setScopesSupported
Sets thescopes_supportedset.- Parameters:
value- The new value. Can benull to unset.- Returns:
- This object (for method chaining).
-
getBearerMethodsSupported
Thebearer_methods_supportedfield — the RFC 6750 methods by which a bearer token may be presented (RFC 9728 §2). This server accepts theheadermethod only.- Returns:
- The supported bearer methods, or
null if not set.
-
setBearerMethodsSupported
Sets thebearer_methods_supportedset.- Parameters:
value- The new value. Can benull to unset.- Returns:
- This object (for method chaining).
-