public static class GoogleAuthorizationCodeFlow.Builder extends AuthorizationCodeFlow.Builder
Implementation is not thread-safe.
| Constructor and Description |
|---|
GoogleAuthorizationCodeFlow.Builder(HttpTransport transport,
JsonFactory jsonFactory,
GoogleClientSecrets clientSecrets,
Iterable<String> scopes) |
GoogleAuthorizationCodeFlow.Builder(HttpTransport transport,
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(HttpExecuteInterceptor clientAuthentication) |
GoogleAuthorizationCodeFlow.Builder |
setClientId(String clientId) |
GoogleAuthorizationCodeFlow.Builder |
setClock(Clock clock) |
GoogleAuthorizationCodeFlow.Builder |
setCredentialStore(CredentialStore credentialStore) |
GoogleAuthorizationCodeFlow.Builder |
setJsonFactory(JsonFactory jsonFactory) |
GoogleAuthorizationCodeFlow.Builder |
setMethod(Credential.AccessMethod method) |
GoogleAuthorizationCodeFlow.Builder |
setRequestInitializer(HttpRequestInitializer requestInitializer) |
GoogleAuthorizationCodeFlow.Builder |
setScopes(Iterable<String> scopes) |
GoogleAuthorizationCodeFlow.Builder |
setScopes(String... scopes) |
GoogleAuthorizationCodeFlow.Builder |
setTokenServerUrl(GenericUrl tokenServerUrl) |
GoogleAuthorizationCodeFlow.Builder |
setTransport(HttpTransport transport) |
getAuthorizationServerEncodedUrl, getClientAuthentication, getClientId, getClock, getCredentialStore, getJsonFactory, getMethod, getRequestInitializer, getScopes, getTokenServerUrl, getTransportpublic GoogleAuthorizationCodeFlow.Builder(HttpTransport transport, 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(HttpTransport transport, 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 AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setCredentialStore(CredentialStore credentialStore)
setCredentialStore in class AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setRequestInitializer(HttpRequestInitializer requestInitializer)
setRequestInitializer in class AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setScopes(Iterable<String> scopes)
setScopes in class AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setScopes(String... scopes)
setScopes in class AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setMethod(Credential.AccessMethod method)
setMethod in class AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setTransport(HttpTransport transport)
setTransport in class AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setJsonFactory(JsonFactory jsonFactory)
setJsonFactory in class AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setTokenServerUrl(GenericUrl tokenServerUrl)
setTokenServerUrl in class AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setClientAuthentication(HttpExecuteInterceptor clientAuthentication)
setClientAuthentication in class AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setClientId(String clientId)
setClientId in class AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setAuthorizationServerEncodedUrl(String authorizationServerEncodedUrl)
setAuthorizationServerEncodedUrl in class AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setClock(Clock clock)
setClock in class 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-2012 Google. All Rights Reserved.