Class NuxeoOAuth2Servlet

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.nuxeo.ecm.platform.oauth2.NuxeoOAuth2Servlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable

public class NuxeoOAuth2Servlet extends jakarta.servlet.http.HttpServlet
Since:
9.2
See Also:
  • Field Details

  • Constructor Details

    • NuxeoOAuth2Servlet

      public NuxeoOAuth2Servlet()
  • Method Details

    • doGet

      protected void doGet(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException
      Overrides:
      doGet in class jakarta.servlet.http.HttpServlet
      Throws:
      jakarta.servlet.ServletException
      IOException
    • doPost

      protected void doPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException
      Overrides:
      doPost in class jakarta.servlet.http.HttpServlet
      Throws:
      jakarta.servlet.ServletException
      IOException
    • doGetAuthorize

      protected void doGetAuthorize(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException, jakarta.servlet.ServletException
      Throws:
      IOException
      jakarta.servlet.ServletException
    • doGetNotAllowed

      protected void doGetNotAllowed(String endpoint, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException, jakarta.servlet.ServletException
      Throws:
      IOException
      jakarta.servlet.ServletException
    • doPostAuthorizeSubmit

      protected void doPostAuthorizeSubmit(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException, jakarta.servlet.ServletException
      Throws:
      IOException
      jakarta.servlet.ServletException
    • getRedirectURI

      protected String getRedirectURI(AuthorizationRequest authRequest)
      Returns the redirect URI included in the given authorization request or fall back on the first one registered for the related client.
    • storeAuthorizationRequest

      protected String storeAuthorizationRequest(AuthorizationRequest authRequest)
    • doPostToken

      protected void doPostToken(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException
      Throws:
      IOException
    • getAndSendToken

      protected void getAndSendToken(jakarta.servlet.http.HttpServletResponse response, String clientId, String username) throws IOException
      Throws:
      IOException
    • handleTokenResponse

      protected void handleTokenResponse(NuxeoOAuth2Token token, jakarta.servlet.http.HttpServletResponse response) throws IOException
      Throws:
      IOException
    • handleError

      protected void handleError(OAuth2Error error, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException, jakarta.servlet.ServletException
      Throws:
      IOException
      jakarta.servlet.ServletException
    • handleError

      @Deprecated protected void handleError(OAuth2Error error, int status, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException, jakarta.servlet.ServletException
      Deprecated.
      since 2021.23, OAuth2Error now contains the status code to give to the response
      Throws:
      IOException
      jakarta.servlet.ServletException
    • handleJsonError

      protected void handleJsonError(OAuth2Error error, jakarta.servlet.http.HttpServletResponse response) throws IOException
      Throws:
      IOException
    • sendRedirect

      protected void sendRedirect(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String redirectURI, Map<String,String> params) throws IOException
      Throws:
      IOException