public static class GoogleAuthorizationCodeFlow.Builder extends AuthorizationCodeFlow.Builder
Implementation is not thread-safe.
| Constructor and Description |
|---|
Builder(HttpTransport transport,
JsonFactory jsonFactory,
GoogleClientSecrets clientSecrets,
Collection<String> scopes) |
Builder(HttpTransport transport,
JsonFactory jsonFactory,
String clientId,
String clientSecret,
Collection<String> scopes) |
enablePKCE, getAuthorizationServerEncodedUrl, getClientAuthentication, getClientId, getClock, getCredentialCreatedListener, getCredentialDataStore, getCredentialStore, getJsonFactory, getMethod, getRefreshListeners, getRequestInitializer, getScopes, getTokenServerUrl, getTransportpublic Builder(HttpTransport transport, JsonFactory jsonFactory, String clientId, String clientSecret, Collection<String> scopes)
transport - HTTP transportjsonFactory - JSON factoryclientId - client identifierclientSecret - client secretscopes - collection of scopes to be joined by a space separator (or a single value
containing multiple space-separated scopes)public Builder(HttpTransport transport, JsonFactory jsonFactory, GoogleClientSecrets clientSecrets, Collection<String> scopes)
transport - HTTP transportjsonFactory - JSON factoryclientSecrets - Google client secretsscopes - collection of scopes to be joined by a space separatorpublic GoogleAuthorizationCodeFlow build()
build in class AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setDataStoreFactory(DataStoreFactory dataStore) throws IOException
setDataStoreFactory in class AuthorizationCodeFlow.BuilderIOExceptionpublic GoogleAuthorizationCodeFlow.Builder setCredentialDataStore(DataStore<StoredCredential> typedDataStore)
setCredentialDataStore in class AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setCredentialCreatedListener(AuthorizationCodeFlow.CredentialCreatedListener credentialCreatedListener)
setCredentialCreatedListener in class AuthorizationCodeFlow.Builder@Beta @Deprecated public GoogleAuthorizationCodeFlow.Builder setCredentialStore(CredentialStore credentialStore)
setCredentialStore in class AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setRequestInitializer(HttpRequestInitializer requestInitializer)
setRequestInitializer in class AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setScopes(Collection<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 addRefreshListener(CredentialRefreshListener refreshListener)
addRefreshListener in class AuthorizationCodeFlow.Builderpublic GoogleAuthorizationCodeFlow.Builder setRefreshListeners(Collection<CredentialRefreshListener> refreshListeners)
setRefreshListeners 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–2021 Google. All rights reserved.