Class AbstractFlowUserServlet (1.34.1)

public abstract class AbstractFlowUserServlet extends HttpServlet

Deprecated. Use com.google.api.client.extensions.servlet.auth.oauth2.AbstractAuthorizationCodeServlet.

Beta
Servlet that can be used to invoke and manage a ThreeLeggedFlow object in the App Engine container. Developers should subclass this to provide the necessary information for their specific use case.

Warning: starting with version 1.7, usage of this for OAuth 2.0 is deprecated. Instead use com.google.api.client.extensions.servlet.auth.oauth2.AbstractAuthorizationCodeServlet.

Inheritance

java.lang.Object > javax.servlet.GenericServlet > HttpServlet > AbstractFlowUserServlet

Constructors

AbstractFlowUserServlet() (deprecated)

public AbstractFlowUserServlet()

Methods

getCredential(HttpServletRequest req) (deprecated)

protected Credential getCredential(HttpServletRequest req)

Fetch a credential associated with this request.

Parameter
NameDescription
reqHttpServletRequest

Request object to use as context for fetching the credential.

Returns
TypeDescription
Credential

Credential object for this request and user.

getHttpTransport() (deprecated)

protected final HttpTransport getHttpTransport()

Return the HttpTransport instance for this servlet.

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

getJsonFactory() (deprecated)

protected final JsonFactory getJsonFactory()

Return the JsonFactory instance for this servlet.

Returns
TypeDescription
com.google.api.client.json.JsonFactory

getPersistenceManagerFactory() (deprecated)

protected abstract PersistenceManagerFactory getPersistenceManagerFactory()

Obtain a PersistenceManagerFactory for working with the datastore.

Returns
TypeDescription
PersistenceManagerFactory

PersistenceManagerFactory instance.

getUserId() (deprecated)

protected abstract String getUserId()
Returns
TypeDescription
String

Get a string representation of a userId that can be used to associate credentials and flows with a specific user.

newFlow(String userId) (deprecated)

protected abstract ThreeLeggedFlow newFlow(String userId)

Create a flow object which will be used to obtain credentials.

Parameter
NameDescription
userIdString

User id to be passed to the constructor of the flow object

Returns
TypeDescription
ThreeLeggedFlow

Flow object used to obtain credentials

Exceptions
TypeDescription
IOException

newHttpTransportInstance() (deprecated)

protected abstract 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

HttpTransport instance for your particular environment

newJsonFactoryInstance() (deprecated)

protected abstract JsonFactory newJsonFactoryInstance()

Create a new JsonFactory instance. Implementations can create any type of applicable json factory and should be as simple as:

new GsonFactory();

Returns
TypeDescription
com.google.api.client.json.JsonFactory

JsonFactory instance for your particular environment

service(HttpServletRequest req, HttpServletResponse resp) (deprecated)

protected void service(HttpServletRequest req, HttpServletResponse resp)
Parameters
NameDescription
reqHttpServletRequest
respHttpServletResponse
Overrides
Exceptions
TypeDescription
IOException
ServletException