Package io.meeds.mcp.server.web
Class McpProtectedResourceMetadataCustomizer
java.lang.Object
io.meeds.mcp.server.web.McpProtectedResourceMetadataCustomizer
- All Implemented Interfaces:
Consumer<org.springframework.security.oauth2.server.resource.OAuth2ProtectedResourceMetadata.Builder>
@Component
public class McpProtectedResourceMetadataCustomizer
extends Object
implements Consumer<org.springframework.security.oauth2.server.resource.OAuth2ProtectedResourceMetadata.Builder>
The claims of the OAuth 2.0 Protected Resource Metadata document (RFC 9728)
of the MCP endpoint. Spring Security's resource server serves that document
itself, at
/.well-known/oauth-protected-resource/**, ahead of any
controller, so the document is customized here and passed to the resource
server configuration of each security filter chain.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe scopes the authorization server grants for the MCP application, read by OAuthSettingService#getScopes from the same property -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(org.springframework.security.oauth2.server.resource.OAuth2ProtectedResourceMetadata.Builder builder)
-
Field Details
-
MCP_SERVER_SCOPES_PROPERTY
The scopes the authorization server grants for the MCP application, read by OAuthSettingService#getScopes from the same property- See Also:
-
-
Constructor Details
-
McpProtectedResourceMetadataCustomizer
public McpProtectedResourceMetadataCustomizer()
-
-
Method Details