public class NuxeoOAuth2Servlet extends javax.servlet.http.HttpServlet
Modifier and Type | Field and Description |
---|---|
static int |
ACCESS_TOKEN_EXPIRATION_TIME |
static String |
CLIENT_NAME |
static String |
ENDPOINT_AUTH |
static String |
ENDPOINT_AUTH_SUBMIT |
static String |
ENDPOINT_TOKEN |
static String |
ERROR_DESCRIPTION_PARAM |
static String |
ERROR_JSP_PAGE_PATH |
static String |
ERROR_PARAM |
static String |
GRANT_ACCESS_PARAM |
static String |
GRANT_JSP_PAGE_PATH |
protected OAuth2TokenStore |
tokenStore |
Constructor and Description |
---|
NuxeoOAuth2Servlet() |
Modifier and Type | Method and Description |
---|---|
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
doGetAuthorize(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
doGetNotAllowed(String endpoint,
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 |
doPostAuthorizeSubmit(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
doPostToken(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
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.
|
protected void |
handleError(OAuth2Error error,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
handleError(OAuth2Error error,
int status,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
handleJsonError(OAuth2Error error,
javax.servlet.http.HttpServletResponse response) |
protected void |
handleTokenResponse(NuxeoOAuth2Token token,
javax.servlet.http.HttpServletResponse response) |
protected void |
sendRedirect(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String redirectURI,
Map<String,String> params) |
protected String |
storeAuthorizationRequest(AuthorizationRequest authRequest) |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
public static final String ENDPOINT_AUTH
public static final String ENDPOINT_TOKEN
public static final String ENDPOINT_AUTH_SUBMIT
public static final String ERROR_PARAM
public static final String ERROR_DESCRIPTION_PARAM
public static final String CLIENT_NAME
public static final String GRANT_JSP_PAGE_PATH
public static final String GRANT_ACCESS_PARAM
public static final String ERROR_JSP_PAGE_PATH
public static final int ACCESS_TOKEN_EXPIRATION_TIME
protected final OAuth2TokenStore tokenStore
public NuxeoOAuth2Servlet()
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
doGet
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
doPost
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
protected void doGetAuthorize(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
protected void doGetNotAllowed(String endpoint, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
protected void doPostAuthorizeSubmit(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
protected String getRedirectURI(AuthorizationRequest authRequest)
protected String storeAuthorizationRequest(AuthorizationRequest authRequest)
protected void doPostToken(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
IOException
protected void handleTokenResponse(NuxeoOAuth2Token token, javax.servlet.http.HttpServletResponse response) throws IOException
IOException
protected void handleError(OAuth2Error error, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
protected void handleError(OAuth2Error error, int status, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
protected void handleJsonError(OAuth2Error error, javax.servlet.http.HttpServletResponse response) throws IOException
IOException
protected void sendRedirect(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String redirectURI, Map<String,String> params) throws IOException
IOException
Copyright © 2018 Nuxeo. All rights reserved.