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
  • Field Details

    • MCP_SERVER

      public static final String MCP_SERVER
      See Also:
    • SSE_ENDPOINT

      public static final String SSE_ENDPOINT
      See Also:
    • MCP_SERVER_SSE

      public static final String MCP_SERVER_SSE
      See Also:
    • STREAMABLE_ENDPOINT

      public static final String STREAMABLE_ENDPOINT
      See Also:
    • MCP_SERVER_STREAMABLE

      public static final String MCP_SERVER_STREAMABLE
      See Also:
    • MCP_SERVER_MESSAGE

      public static final String MCP_SERVER_MESSAGE
      See Also:
    • USER_ID

      public static final String USER_ID
    • REQUIRE_ORIGIN_HEADER

      public static boolean REQUIRE_ORIGIN_HEADER
      Whether to require the Origin header in requests. Default is false, can be overridden by setting the system property io.jenkins.plugins.mcp.server.Endpoint.requireOriginHeader=true.
    • REQUIRE_ORIGIN_MATCH

      public static boolean REQUIRE_ORIGIN_MATCH
      Whether to require the Origin header to match the Jenkins root URL. Default is true, can be overridden by setting the system property io.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:
      process in class CrumbExclusion
      Throws:
      IOException
      jakarta.servlet.ServletException
    • init

      protected void init() throws jakarta.servlet.ServletException
      Throws:
      jakarta.servlet.ServletException
    • getIconFileName

      public String getIconFileName()
      Specified by:
      getIconFileName in interface Action
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface Action
      Specified by:
      getDisplayName in interface ModelObject
    • getUrlName

      public String getUrlName()
      Specified by:
      getUrlName in interface Action
    • handleSSE

      protected void handleSSE(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response) throws IOException, jakarta.servlet.ServletException
      Throws:
      IOException
      jakarta.servlet.ServletException