Serializable
@Beta
public abstract class AbstractFlowUserServlet
extends javax.servlet.http.HttpServlet
Beta
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 AbstractAuthorizationCodeServlet
.
Constructor | Description |
---|---|
AbstractFlowUserServlet() |
Modifier and Type | Method | Description |
---|---|---|
protected Credential |
getCredential(javax.servlet.http.HttpServletRequest req) |
Fetch a credential associated with this request.
|
protected com.google.api.client.http.HttpTransport |
getHttpTransport() |
Return the
HttpTransport instance for this servlet. |
protected com.google.api.client.json.JsonFactory |
getJsonFactory() |
Return the
JsonFactory instance for this servlet. |
protected abstract javax.jdo.PersistenceManagerFactory |
getPersistenceManagerFactory() |
Obtain a PersistenceManagerFactory for working with the datastore.
|
protected abstract String |
getUserId() |
|
protected abstract ThreeLeggedFlow |
newFlow(String userId) |
Create a flow object which will be used to obtain credentials.
|
protected abstract com.google.api.client.http.HttpTransport |
newHttpTransportInstance() |
Create a new
HttpTransport instance. |
protected abstract com.google.api.client.json.JsonFactory |
newJsonFactoryInstance() |
Create a new
JsonFactory instance. |
protected void |
service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
protected void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws IOException, javax.servlet.ServletException
service
in class javax.servlet.http.HttpServlet
IOException
javax.servlet.ServletException
protected Credential getCredential(javax.servlet.http.HttpServletRequest req)
req
- Request object to use as context for fetching the credential.protected final com.google.api.client.json.JsonFactory getJsonFactory()
JsonFactory
instance for this servlet.protected final com.google.api.client.http.HttpTransport getHttpTransport()
HttpTransport
instance for this servlet.protected abstract javax.jdo.PersistenceManagerFactory getPersistenceManagerFactory()
protected abstract ThreeLeggedFlow newFlow(String userId) throws IOException
userId
- User id to be passed to the constructor of the flow objectIOException
protected abstract com.google.api.client.http.HttpTransport newHttpTransportInstance()
HttpTransport
instance. Implementations can create any type of applicable
transport and should be as simple as:
new NetHttpTransport();
HttpTransport
instance for your particular environmentprotected abstract com.google.api.client.json.JsonFactory newJsonFactoryInstance()
JsonFactory
instance. Implementations can create any type of applicable
json factory and should be as simple as:
new JacksonFactory();
JsonFactory
instance for your particular environmentprotected abstract String getUserId()
Copyright © 2011–2019 Google. All rights reserved.