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.HttpServletServlet for the /oauth endpoint.- Since:
- 10.3
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringAPPLICATION_X_WWW_FORM_URLENCODEDstatic StringDURATION_PARAMstatic StringENDPOINT_ACCESS_TOKENstatic StringENDPOINT_AUTHORIZEstatic StringENDPOINT_REQUEST_TOKENstatic StringGRANT_PAGEstatic StringLOGIN_PAGEstatic StringNUXEO_LOGIN_PARAMstatic StringOAUTH_CALLBACK_CONFIRMEDstatic StringOAUTH_INFO_SESSION_KEYstatic StringOAUTH_VERIFIER
-
Constructor Summary
Constructors Constructor Description NuxeoOAuth1Servlet()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)protected voiddoGetAccessToken(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)protected voiddoGetAuthorize(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 voiddoGetRequestToken(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)protected voiddoPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)protected voiddoPostAuthorize(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 StringurlEncode(String string)-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
-
-
-
-
Field Detail
-
ENDPOINT_REQUEST_TOKEN
public static final String ENDPOINT_REQUEST_TOKEN
- See Also:
- Constant Field Values
-
ENDPOINT_AUTHORIZE
public static final String ENDPOINT_AUTHORIZE
- See Also:
- Constant Field Values
-
ENDPOINT_ACCESS_TOKEN
public static final String ENDPOINT_ACCESS_TOKEN
- See Also:
- Constant Field Values
-
OAUTH_VERIFIER
public static final String OAUTH_VERIFIER
- See Also:
- Constant Field Values
-
OAUTH_CALLBACK_CONFIRMED
public static final String OAUTH_CALLBACK_CONFIRMED
- See Also:
- Constant Field Values
-
NUXEO_LOGIN_PARAM
public static final String NUXEO_LOGIN_PARAM
- See Also:
- Constant Field Values
-
DURATION_PARAM
public static final String DURATION_PARAM
- See Also:
- Constant Field Values
-
OAUTH_INFO_SESSION_KEY
public static final String OAUTH_INFO_SESSION_KEY
- See Also:
- Constant Field Values
-
GRANT_PAGE
public static final String GRANT_PAGE
- See Also:
- Constant Field Values
-
LOGIN_PAGE
public static final String LOGIN_PAGE
- See Also:
- Constant Field Values
-
APPLICATION_X_WWW_FORM_URLENCODED
public static final String APPLICATION_X_WWW_FORM_URLENCODED
- See Also:
- Constant Field Values
-
-
Method Detail
-
doGet
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException- Overrides:
doGetin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
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
-
doGetAuthorize
protected void doGetAuthorize(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOExceptionGenerates 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 IOExceptionAdds 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
-
-