pub fn default_credentials() -> Result<Arc<dyn Credentials>, Error>Expand description
The first credentials found, in this order:
ORIGINCLOUD_ACCESS_TOKEN: an access token, sent as it is.ORIGINCLOUD_CLIENT_IDandORIGINCLOUD_CLIENT_SECRET: a service account’s credential, exchanged for access tokens as they expire. Only one of the two set is an error.- The session the
originCLI stored at its last login (origin id login). - The instance’s metadata service, on an instance that runs as a
service account (
InstanceMetadata). Nothing is requested until a token is; off an instance, that fails withError::NoCredentialswithin about two seconds.ORIGINCLOUD_METADATA_DISABLED=trueleaves this step out;ORIGINCLOUD_METADATA_ENDPOINTasks another address thanMETADATA_ENDPOINT.
It fails with Error::NoCredentials when the metadata service is
left out and there are no others.