Java com.google.api.client.googleapis.auth.oauth2 GoogleCredential fields, constructors, methods, implement or subclass

Example usage for Java com.google.api.client.googleapis.auth.oauth2 GoogleCredential fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.google.api.client.googleapis.auth.oauth2 GoogleCredential.

The text is from its open source code.

Constructor

GoogleCredential()
Constructor with the ability to access protected resources, but not refresh tokens.

Method

GoogleCredentialcreateScoped(Collection scopes)
Beta
For credentials that require scopes, creates a copy of the credential with the specified scopes.
booleancreateScopedRequired()
Beta
Indicates whether the credential requires scopes to be specified by calling createScoped before use.
GoogleCredentialfromStream(InputStream credentialStream)
Beta
Return a credential defined by a Json file.
GoogleCredentialfromStream(InputStream credentialStream, HttpTransport transport, JsonFactory jsonFactory)
Beta
Return a credential defined by a Json file.
GoogleCredentialgetApplicationDefault()
Beta
Returns the Application Default Credentials.
GoogleCredentialgetApplicationDefault(HttpTransport transport, JsonFactory jsonFactory)
Beta
Returns the Application Default Credentials.
StringgetServiceAccountId()
Returns the service account ID (typically an e-mail address) or null if not using the service account flow.
PrivateKeygetServiceAccountPrivateKey()
Returns the private key to use with the service account flow or null if not using the service account flow.
StringgetServiceAccountPrivateKeyId()
Beta
Returns the ID of the private key to use with the service account flow or null if not using the service account flow.
GoogleCredentialsetAccessToken(String accessToken)
GoogleCredentialsetExpirationTimeMilliseconds(Long expirationTimeMilliseconds)
GoogleCredentialsetExpiresInSeconds(Long expiresIn)
GoogleCredentialsetFromTokenResponse(TokenResponse tokenResponse)
GoogleCredentialsetRefreshToken(String refreshToken)