| Package | Description |
|---|---|
| com.google.auth.oauth2 |
| Modifier and Type | Class and Description |
|---|---|
class |
CloudShellCredentials
OAuth2 credentials representing the built-in service account for Google Cloud Shell.
|
class |
ComputeEngineCredentials
OAuth2 credentials representing the built-in service account for a Google Compute Engine VM.
|
class |
ServiceAccountCredentials
OAuth2 credentials representing a Service Account for calling Google APIs.
|
class |
UserCredentials
OAuth2 Credentials representing a user's identity and consent.
|
| Modifier and Type | Method and Description |
|---|---|
GoogleCredentials |
GoogleCredentials.Builder.build() |
static GoogleCredentials |
GoogleCredentials.create(AccessToken accessToken)
Returns the credentials instance from the given access token.
|
GoogleCredentials |
GoogleCredentials.createDelegated(String user)
If the credentials support domain-wide delegation, creates a copy
of the identity so that it impersonates the specified user;
otherwise, returns the same instance.
|
GoogleCredentials |
ServiceAccountCredentials.createDelegated(String user) |
GoogleCredentials |
GoogleCredentials.createScoped(Collection<String> scopes)
If the credentials support scopes, creates a copy of the the identity with the specified
scopes; otherwise, returns the same instance.
|
GoogleCredentials |
ServiceAccountCredentials.createScoped(Collection<String> newScopes)
Clones the service account with the specified scopes.
|
static GoogleCredentials |
GoogleCredentials.fromStream(InputStream credentialsStream)
Returns credentials defined by a JSON file stream.
|
static GoogleCredentials |
GoogleCredentials.fromStream(InputStream credentialsStream,
HttpTransportFactory transportFactory)
Returns credentials defined by a JSON file stream.
|
static GoogleCredentials |
GoogleCredentials.getApplicationDefault()
Returns the Application Default Credentials.
|
static GoogleCredentials |
GoogleCredentials.getApplicationDefault(HttpTransportFactory transportFactory)
Returns the Application Default Credentials.
|
static GoogleCredentials |
GoogleCredentials.of(AccessToken accessToken)
Deprecated.
Use
create(AccessToken) instead. This method will be deleted in a later
version. |
| Constructor and Description |
|---|
Builder(GoogleCredentials credentials) |
Copyright © 2017 Google. All rights reserved.