Class AbstractCallbackServlet (1.33.3)

public abstract class AbstractCallbackServlet extends HttpServlet

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

Beta
Callback that will retrieve and complete a ThreeLeggedFlow when redirected to by a token server or service provider. Developer should subclass to provide the necessary information tailored to 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.AbstractAuthorizationCodeCallbackServlet.

Inheritance

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

Constructors

AbstractCallbackServlet() (deprecated)

public AbstractCallbackServlet()

Constructor with will ask the concrete subclass for all required information on the environment.

Methods

doGet(HttpServletRequest req, HttpServletResponse resp) (deprecated)

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

getCompletionCodeQueryParam() (deprecated)

protected abstract String getCompletionCodeQueryParam()
Returns
TypeDescription
String

Specific query parameter keyword to key off of to get completion code. (e.g. "code" for OAuth2 and "verifier" for OAuth1)

getConcreteFlowType() (deprecated)

protected abstract Class<? extends ThreeLeggedFlow> getConcreteFlowType()
Returns
TypeDescription
Class<? extends com.google.api.client.extensions.auth.helpers.ThreeLeggedFlow>

Specific ThreeLeggedFlow type that this callback should retreieve and complete.

getDeniedRedirectUrl() (deprecated)

protected abstract String getDeniedRedirectUrl()
Returns
TypeDescription
String

Url to redirect the user to upon failure.

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()

Override with your chosen method to get a PersistenceManagerFactory. For app engine applications this should be a singleton.

Returns
TypeDescription
PersistenceManagerFactory

PersistenceManagerFactory instance.

getSuccessRedirectUrl() (deprecated)

protected abstract String getSuccessRedirectUrl()
Returns
TypeDescription
String

Url to redirect the user to upon a successful credential exchange.

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.

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