@Beta public abstract class AbstractAppEngineCallbackServlet extends AbstractCallbackServlet
Beta AbstractCallbackServlet
with reasonable defaults for App Engine. It will default the servlet to creating
UrlFetchTransport objects whenever an HttpTransport is needed. It will also
default the user identifier to the logged in App Engine user. This servlet requires that the App
Engine user must be logged in to work correctly. This can be accomplished by adding a security
constraint in your web.xml for the path at which this servlet will live.
Example that requires login for all pages:
<security-constraint>
<web-resource-collection>
<web-resource-name>any</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>*</role-name>
</auth-constraint>
</security-constraint>
Warning: starting with version 1.7, usage of this for OAuth 2.0 is deprecated. Instead use AbstractAppEngineAuthorizationCodeCallbackServlet.
Upgrade warning: in version 1.15 there was an implementation of AbstractCallbackServlet.newJsonFactoryInstance()
that used com.google.api.client.json.jackson.JacksonFactory, but starting with version
1.16 there is no such implementation.
| Constructor and Description |
|---|
AbstractAppEngineCallbackServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getUserId()
Return the user ID of the user that is logged in.
|
protected com.google.api.client.http.HttpTransport |
newHttpTransportInstance() |
doGet, getCompletionCodeQueryParam, getConcreteFlowType, getDeniedRedirectUrl, getHttpTransport, getJsonFactory, getPersistenceManagerFactory, getSuccessRedirectUrl, newJsonFactoryInstancedoDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, serviceprotected String getUserId()
getUserId in class AbstractCallbackServletIllegalStateException - Thrown when no user is logged in.protected com.google.api.client.http.HttpTransport newHttpTransportInstance()
newHttpTransportInstance in class AbstractCallbackServletCopyright © 2011-2015 Google. All Rights Reserved.