Package io.jenkins.plugins.mcp.server
Class Endpoint
java.lang.Object
hudson.security.csrf.CrumbExclusion
io.jenkins.plugins.mcp.server.Endpoint
- All Implemented Interfaces:
ExtensionPoint,Action,ModelObject,RootAction
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
@Extension
public class Endpoint
extends CrumbExclusion
implements RootAction
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic booleanWhether to require the Origin header in requests.static booleanWhether to require the Origin header to match the Jenkins root URL.static final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetRequestedResourcePath(jakarta.servlet.http.HttpServletRequest httpServletRequest) protected voidhandleSSE(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response) protected voidinit()booleanprocess(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.FilterChain chain) Methods inherited from class hudson.security.csrf.CrumbExclusion
all, process
-
Field Details
-
MCP_SERVER
- See Also:
-
SSE_ENDPOINT
- See Also:
-
MCP_SERVER_SSE
- See Also:
-
STREAMABLE_ENDPOINT
- See Also:
-
MCP_SERVER_STREAMABLE
- See Also:
-
MCP_SERVER_MESSAGE
- See Also:
-
USER_ID
-
REQUIRE_ORIGIN_HEADER
public static boolean REQUIRE_ORIGIN_HEADERWhether to require the Origin header in requests. Default is false, can be overridden by setting the system propertyio.jenkins.plugins.mcp.server.Endpoint.requireOriginHeader=true. -
REQUIRE_ORIGIN_MATCH
public static boolean REQUIRE_ORIGIN_MATCHWhether to require the Origin header to match the Jenkins root URL. Default is true, can be overridden by setting the system propertyio.jenkins.plugins.mcp.server.Endpoint.requireOriginMatch=false. The header will be validated only if present.
-
-
Constructor Details
-
Endpoint
public Endpoint() throws jakarta.servlet.ServletException- Throws:
jakarta.servlet.ServletException
-
-
Method Details
-
getRequestedResourcePath
public static String getRequestedResourcePath(jakarta.servlet.http.HttpServletRequest httpServletRequest) -
process
public boolean process(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.FilterChain chain) throws IOException, jakarta.servlet.ServletException - Overrides:
processin classCrumbExclusion- Throws:
IOExceptionjakarta.servlet.ServletException
-
init
protected void init() throws jakarta.servlet.ServletException- Throws:
jakarta.servlet.ServletException
-
getIconFileName
- Specified by:
getIconFileNamein interfaceAction
-
getDisplayName
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getUrlName
- Specified by:
getUrlNamein interfaceAction
-
handleSSE
protected void handleSSE(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response) throws IOException, jakarta.servlet.ServletException - Throws:
IOExceptionjakarta.servlet.ServletException
-