public class CloudShellCredentials extends GoogleCredentials
OAuth2 credentials representing the built-in service account for Google Cloud Shell.
Fields
GET_AUTH_TOKEN_REQUEST
protected static final String GET_AUTH_TOKEN_REQUEST
The Cloud Shell back authorization channel uses serialized Javascript Protobuffers, preceded by the message length 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.
Type | Description |
String |
GET_AUTH_TOKEN_REQUEST_BYTES
protected static final byte[] GET_AUTH_TOKEN_REQUEST_BYTES
Type | Description |
byte[] |
Methods
create(int authPort)
public static CloudShellCredentials create(int authPort)
Name | Description |
authPort | int |
Type | Description |
CloudShellCredentials |
equals(Object obj)
public boolean equals(Object obj)
Name | Description |
obj | Object |
Type | Description |
boolean |
getAuthPort()
protected int getAuthPort()
Type | Description |
int |
hashCode()
public int hashCode()
Type | Description |
int |
newBuilder()
public static CloudShellCredentials.Builder newBuilder()
Type | Description |
CloudShellCredentials.Builder |
refreshAccessToken()
public AccessToken refreshAccessToken()
Method to refresh the access token according to the specific type of credentials.
Throws IllegalStateException if not overridden since direct use of OAuth2Credentials is only for temporary or non-refreshing access tokens.
Type | Description |
AccessToken |
Type | Description |
IOException |
toBuilder()
public CloudShellCredentials.Builder toBuilder()
Type | Description |
CloudShellCredentials.Builder |
toString()
public String toString()
Type | Description |
String |