Class GrouperOAuthServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
edu.internet2.middleware.grouper.ws.mcp.GrouperOAuthServlet
- All Implemented Interfaces:
Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
public class GrouperOAuthServlet
extends javax.servlet.http.HttpServlet
OAuth 2.1 + PKCE servlet for MCP authentication.
Handles the following endpoints under /mcp/oauth/*:
- POST /mcp/oauth/token - Token endpoint (exchanges auth code + PKCE verifier for JWT)
- POST /mcp/oauth/register - Dynamic client registration (anonymous, rate-limited)
Registration is anonymous (no authentication required) and protected by: the redirect URI allowlist, IP-based rate limiting, and the fact that registration alone grants zero access — the user must still complete the OAuth consent flow and be in the proper MCP authorization groups.
The authorization endpoint is handled by the Grouper UI at
grouperUi/app/UiV2OAuth.authorize so the user gets authenticated
and sees the consent page directly without an extra redirect hop.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, serviceMethods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
-
Constructor Details
-
GrouperOAuthServlet
public GrouperOAuthServlet()
-
-
Method Details
-
doPost
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException - Overrides:
doPostin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-