Class AbstractAppEngineCallbackServlet (1.33.3)

public abstract class AbstractAppEngineCallbackServlet extends AbstractCallbackServlet

Beta
This servlet fills in some of the required information for the 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 com.google.api.client.extensions.appengine.auth.oauth2.AbstractAppEngineAuthorizationCodeCallbackServlet.

Inheritance

java.lang.Object > javax.servlet.GenericServlet > HttpServlet > AbstractCallbackServlet > AbstractAppEngineCallbackServlet

Constructors

AbstractAppEngineCallbackServlet()

public AbstractAppEngineCallbackServlet()

Methods

getUserId()

protected String getUserId()

Return the user ID of the user that is logged in.

Returns
TypeDescription
String
Overrides

newHttpTransportInstance()

protected HttpTransport newHttpTransportInstance()

Create a new HttpTransport instance. Implementations can create any type of applicable transport and should be as simple as:

new NetHttpTransport();

Returns
TypeDescription
com.google.api.client.http.HttpTransport
Overrides