public static class OAuth2Credentials.Builder
extends java.lang.Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
OAuth2Credentials |
build()
Builds an OAuth2Credentials.
|
OAuth2Credentials.Builder |
setAuthorizationCodeFlow(com.google.api.client.auth.oauth2.AuthorizationCodeFlow authorizationCodeFlow)
Sets the authorization code flow.
|
OAuth2Credentials.Builder |
setClientSecrets(java.lang.String clientId,
java.lang.String clientSecret)
Sets the client ID and secret retrieved from the
Manage Apps page.
|
OAuth2Credentials.Builder |
setCredentialDataStoreFactory(com.google.api.client.util.store.AbstractDataStoreFactory credentialDataStoreFactory)
Sets the Credential DataStore factory used for storing and loading Credentials per user.
|
OAuth2Credentials.Builder |
setCustomScopes(java.util.Collection<java.lang.String> scopes)
Sets a list of custom scopes that your application must be explicitly whitelisted
for.
|
OAuth2Credentials.Builder |
setHttpTransport(com.google.api.client.http.HttpTransport httpTransport)
Sets the HTTP Transport.
|
OAuth2Credentials.Builder |
setRedirectUri(java.lang.String redirectUri)
Sets the redirect URI for authentication request.
|
OAuth2Credentials.Builder |
setScopes(java.util.Collection<Scope> scopes)
Sets the scopes to request for authentication for.
|
OAuth2Credentials.Builder |
setSessionConfiguration(SessionConfiguration configuration)
Set the
SessionConfiguration information |
public OAuth2Credentials.Builder setSessionConfiguration(SessionConfiguration configuration)
SessionConfiguration informationpublic OAuth2Credentials.Builder setScopes(java.util.Collection<Scope> scopes)
public OAuth2Credentials.Builder setCustomScopes(java.util.Collection<java.lang.String> scopes)
setScopes(Collection) instead.public OAuth2Credentials.Builder setClientSecrets(java.lang.String clientId, java.lang.String clientSecret)
public OAuth2Credentials.Builder setRedirectUri(java.lang.String redirectUri)
public OAuth2Credentials.Builder setHttpTransport(com.google.api.client.http.HttpTransport httpTransport)
NetHttpTransport.public OAuth2Credentials.Builder setCredentialDataStoreFactory(com.google.api.client.util.store.AbstractDataStoreFactory credentialDataStoreFactory)
MemoryDataStoreFactory.public OAuth2Credentials.Builder setAuthorizationCodeFlow(com.google.api.client.auth.oauth2.AuthorizationCodeFlow authorizationCodeFlow)
public OAuth2Credentials build()