Class CloudShellCredential (2.5.0)

public class CloudShellCredential extends GoogleCredential

Deprecated. Please use google-auth-library for handling authentication and authorization from Cloud Shell.

OAuth2 credentials representing the built-in service account for Google Cloud Shell.

Inheritance

java.lang.Object > com.google.api.client.auth.oauth2.Credential > GoogleCredential > CloudShellCredential

Static Fields

GET_AUTH_TOKEN_REQUEST (deprecated)

protected static final String GET_AUTH_TOKEN_REQUEST

The Cloud Shell back authorization channel uses serialized Javascript Protobufers, preceded by the message lengeth and a new line character. However, the request message has no content, so a token request consists of an empty JsPb, and its 2 character length prefix.

Field Value
Type Description
String

Constructors

CloudShellCredential(int authPort, JsonFactory jsonFactory) (deprecated)

public CloudShellCredential(int authPort, JsonFactory jsonFactory)
Parameters
Name Description
authPort int
jsonFactory com.google.api.client.json.JsonFactory

Methods

executeRefreshToken() (deprecated)

protected TokenResponse executeRefreshToken()
Returns
Type Description
com.google.api.client.auth.oauth2.TokenResponse
Overrides
Exceptions
Type Description
IOException

getAuthPort() (deprecated)

protected int getAuthPort()
Returns
Type Description
int