Skip to main content

default_credentials

Function default_credentials 

Source
pub fn default_credentials() -> Result<Arc<dyn Credentials>, Error>
Expand description

The first credentials found, in this order:

  1. ORIGINCLOUD_ACCESS_TOKEN: an access token, sent as it is.
  2. ORIGINCLOUD_CLIENT_ID and ORIGINCLOUD_CLIENT_SECRET: a service account’s credential, exchanged for access tokens as they expire. Only one of the two set is an error.
  3. The session the origin CLI stored at its last login (origin id login).

It fails with Error::NoCredentials when there are none.