public interface ThreeLeggedFlow
Deprecated. Use com.google.api.client.auth.oauth2.AuthorizationCodeFlow.
Beta
Interface for auth flows that require a user authorization step through a web browser to obtain
an authorization code.
Implementations are required to be PersistenceCapable for storage in JDO compliant datastores during user authorization step.
Warning: starting with version 1.7, usage of this for OAuth 2.0 is deprecated. Instead use com.google.api.client.auth.oauth2.AuthorizationCodeFlow.
Methods
complete(String authorizationCode) (deprecated)
public abstract Credential complete(String authorizationCode)
After the user has authorized the request, the token or code obtained should be passed to this complete function to allow us to exchange the code with the authentication server for a Credential.
Parameter | |
---|---|
Name | Description |
authorizationCode |
String Code or token obtained after the user grants permission |
Returns | |
---|---|
Type | Description |
Credential |
Credential object that is obtained from token server |
Exceptions | |
---|---|
Type | Description |
IOException |
getAuthorizationUrl() (deprecated)
public abstract String getAuthorizationUrl()
After the object is created, the developer should use this method to interrogate it for the authorization URL to which the user should be redirected to obtain permission.
Returns | |
---|---|
Type | Description |
String |
URL to which the user should be directed |
loadCredential(PersistenceManager pm) (deprecated)
public abstract Credential loadCredential(PersistenceManager pm)
Convenience function that will load a credential based on the userId for which this flow was instantiated.
Parameter | |
---|---|
Name | Description |
pm |
PersistenceManager PersistenceManager instance which this flow should use to interact with the data store. The caller must remember to call PersistenceManager#close() after this method returns. |
Returns | |
---|---|
Type | Description |
Credential |
Fully initialized Credential object or |
setHttpTransport(HttpTransport transport) (deprecated)
public abstract void setHttpTransport(HttpTransport transport)
Set HttpTransport instance for this three legged flow.
Parameter | |
---|---|
Name | Description |
transport |
com.google.api.client.http.HttpTransport |
setJsonFactory(JsonFactory jsonFactory) (deprecated)
public abstract void setJsonFactory(JsonFactory jsonFactory)
Set JsonFactory instance for this three legged flow.
Parameter | |
---|---|
Name | Description |
jsonFactory |
com.google.api.client.json.JsonFactory |