public static class GoogleAuthorizationCodeFlow.Builder
extends com.google.api.client.auth.oauth2.AuthorizationCodeFlow.Builder
Implementation is not thread-safe.
| Constructor and Description |
|---|
GoogleAuthorizationCodeFlow.Builder(com.google.api.client.http.HttpTransport transport,
com.google.api.client.json.JsonFactory jsonFactory,
GoogleClientSecrets clientSecrets,
Iterable<String> scopes) |
GoogleAuthorizationCodeFlow.Builder(com.google.api.client.http.HttpTransport transport,
com.google.api.client.json.JsonFactory jsonFactory,
String clientId,
String clientSecret,
Iterable<String> scopes) |
| Modifier and Type | Method and Description |
|---|---|
GoogleAuthorizationCodeFlow |
build() |
String |
getAccessType()
Returns the access type (
"online" to request online access or "offline" to
request offline access) or null for the default behavior of "online". |
String |
getApprovalPrompt()
Returns the approval prompt behavior (
"auto" to request auto-approval or
"force" to force the approval UI to show) or null for the default behavior of
"auto". |
GoogleAuthorizationCodeFlow.Builder |
setAccessType(String accessType)
Sets the access type (
"online" to request online access or "offline" to
request offline access) or null for the default behavior ("online" for web
applications and "offline" for installed applications). |
GoogleAuthorizationCodeFlow.Builder |
setApprovalPrompt(String approvalPrompt)
Sets the approval prompt behavior (
"auto" to request auto-approval or "force"
to force the approval UI to show) or null for the default behavior ("auto"
for web applications and "force" for installed applications). |
GoogleAuthorizationCodeFlow.Builder |
setAuthorizationServerEncodedUrl(String authorizationServerEncodedUrl) |
GoogleAuthorizationCodeFlow.Builder |
setClientAuthentication(com.google.api.client.http.HttpExecuteInterceptor clientAuthentication) |
GoogleAuthorizationCodeFlow.Builder |
setClientId(String clientId) |
GoogleAuthorizationCodeFlow.Builder |
setClock(com.google.api.client.util.Clock clock) |
GoogleAuthorizationCodeFlow.Builder |
setCredentialStore(com.google.api.client.auth.oauth2.CredentialStore credentialStore) |
GoogleAuthorizationCodeFlow.Builder |
setJsonFactory(com.google.api.client.json.JsonFactory jsonFactory) |
GoogleAuthorizationCodeFlow.Builder |
setMethod(com.google.api.client.auth.oauth2.Credential.AccessMethod method) |
GoogleAuthorizationCodeFlow.Builder |
setRequestInitializer(com.google.api.client.http.HttpRequestInitializer requestInitializer) |
GoogleAuthorizationCodeFlow.Builder |
setScopes(Iterable<String> scopes) |
GoogleAuthorizationCodeFlow.Builder |
setScopes(String... scopes) |
GoogleAuthorizationCodeFlow.Builder |
setTokenServerUrl(com.google.api.client.http.GenericUrl tokenServerUrl) |
GoogleAuthorizationCodeFlow.Builder |
setTransport(com.google.api.client.http.HttpTransport transport) |
public GoogleAuthorizationCodeFlow.Builder(com.google.api.client.http.HttpTransport transport,
com.google.api.client.json.JsonFactory jsonFactory,
String clientId,
String clientSecret,
Iterable<String> scopes)
transport - HTTP transportjsonFactory - JSON factoryclientId - client identifierclientSecret - client secretscopes - list of scopes to be joined by a space separator (or a single value containing
multiple space-separated scopes)public GoogleAuthorizationCodeFlow.Builder(com.google.api.client.http.HttpTransport transport,
com.google.api.client.json.JsonFactory jsonFactory,
GoogleClientSecrets clientSecrets,
Iterable<String> scopes)
transport - HTTP transportjsonFactory - JSON factoryclientSecrets - Google client secretsscopes - list of scopes to be joined by a space separator (or a single value containing
multiple space-separated scopes)public GoogleAuthorizationCodeFlow build()
build in class com.google.api.client.auth.oauth2.AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setCredentialStore(com.google.api.client.auth.oauth2.CredentialStore credentialStore)
setCredentialStore in class com.google.api.client.auth.oauth2.AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setRequestInitializer(com.google.api.client.http.HttpRequestInitializer requestInitializer)
setRequestInitializer in class com.google.api.client.auth.oauth2.AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setScopes(Iterable<String> scopes)
setScopes in class com.google.api.client.auth.oauth2.AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setScopes(String... scopes)
setScopes in class com.google.api.client.auth.oauth2.AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setMethod(com.google.api.client.auth.oauth2.Credential.AccessMethod method)
setMethod in class com.google.api.client.auth.oauth2.AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setTransport(com.google.api.client.http.HttpTransport transport)
setTransport in class com.google.api.client.auth.oauth2.AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setJsonFactory(com.google.api.client.json.JsonFactory jsonFactory)
setJsonFactory in class com.google.api.client.auth.oauth2.AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setTokenServerUrl(com.google.api.client.http.GenericUrl tokenServerUrl)
setTokenServerUrl in class com.google.api.client.auth.oauth2.AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setClientAuthentication(com.google.api.client.http.HttpExecuteInterceptor clientAuthentication)
setClientAuthentication in class com.google.api.client.auth.oauth2.AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setClientId(String clientId)
setClientId in class com.google.api.client.auth.oauth2.AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setAuthorizationServerEncodedUrl(String authorizationServerEncodedUrl)
setAuthorizationServerEncodedUrl in class com.google.api.client.auth.oauth2.AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setClock(com.google.api.client.util.Clock clock)
setClock in class com.google.api.client.auth.oauth2.AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setApprovalPrompt(String approvalPrompt)
"auto" to request auto-approval or "force"
to force the approval UI to show) or null for the default behavior ("auto"
for web applications and "force" for installed applications).
By default this has the value null.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public final String getApprovalPrompt()
"auto" to request auto-approval or
"force" to force the approval UI to show) or null for the default behavior of
"auto".public GoogleAuthorizationCodeFlow.Builder setAccessType(String accessType)
"online" to request online access or "offline" to
request offline access) or null for the default behavior ("online" for web
applications and "offline" for installed applications).
By default this has the value null.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public final String getAccessType()
"online" to request online access or "offline" to
request offline access) or null for the default behavior of "online".Copyright © 2010-2013 Google. All Rights Reserved.