Class NuxeoOAuth1Servlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.nuxeo.ecm.platform.ui.web.auth.oauth.NuxeoOAuth1Servlet
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public class NuxeoOAuth1Servlet
extends javax.servlet.http.HttpServlet
Servlet for the /oauth endpoint.
- Since:
- 10.3
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
doGet
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) protected void
doGetAccessToken
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) protected void
doGetAuthorize
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Generates a request token, redirects to the Nuxeo login page, and provides a later redirect URL to the OAuth grant page.protected void
doGetRequestToken
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) protected void
doPost
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) protected void
doPostAuthorize
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Adds a verifier and username to the request token and redirects to the callback URL.protected static String
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
-
Field Details
-
ENDPOINT_REQUEST_TOKEN
- See Also:
-
ENDPOINT_AUTHORIZE
- See Also:
-
ENDPOINT_ACCESS_TOKEN
- See Also:
-
OAUTH_VERIFIER
- See Also:
-
OAUTH_CALLBACK_CONFIRMED
- See Also:
-
NUXEO_LOGIN_PARAM
- See Also:
-
DURATION_PARAM
- See Also:
-
OAUTH_INFO_SESSION_KEY
- See Also:
-
GRANT_PAGE
- See Also:
-
LOGIN_PAGE
- See Also:
-
APPLICATION_X_WWW_FORM_URLENCODED
- See Also:
-
-
Constructor Details
-
NuxeoOAuth1Servlet
public NuxeoOAuth1Servlet()
-
-
Method Details
-
urlEncode
-
doGet
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException - Overrides:
doGet
in classjavax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
-
doPost
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException - Overrides:
doPost
in classjavax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
-
doGetAuthorize
protected void doGetAuthorize(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException Generates a request token, redirects to the Nuxeo login page, and provides a later redirect URL to the OAuth grant page.- Throws:
IOException
-
doPostAuthorize
protected void doPostAuthorize(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException Adds a verifier and username to the request token and redirects to the callback URL.- Throws:
IOException
-
doGetRequestToken
protected void doGetRequestToken(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException - Throws:
IOException
-
doGetAccessToken
protected void doGetAccessToken(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException - Throws:
IOException
-