Send feedback
Class CloudShellCredentials (1.3.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 1.3.0 keyboard_arrow_down
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.
Field Value
GET_AUTH_TOKEN_REQUEST_BYTES
protected static final byte [] GET_AUTH_TOKEN_REQUEST_BYTES
Field Value
Methods
create(int authPort)
public static CloudShellCredentials create ( int authPort )
Parameter
Name Description authPort int
Returns
equals(Object obj)
public boolean equals ( Object obj )
Parameter
Returns
Overrides
getAuthPort()
protected int getAuthPort ()
Returns
hashCode()
Returns
Overrides
newBuilder()
public static CloudShellCredentials . Builder newBuilder ()
Returns
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.
Returns
Overrides
Exceptions
toBuilder()
public CloudShellCredentials . Builder toBuilder ()
Returns
Overrides
toString()
Returns
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-20 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{"lastModified": "Last updated 2024-09-20 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-20 UTC."]]