save_token

Function save_token 

Source
pub fn save_token(token: &SavedToken) -> Result<()>
Expand description

Saves a token to either a file or the system keyring.

  • If GCLOUD_IDENTITY_TOKEN_PATH is set, the token will be saved to that file path.
  • Otherwise, it saves to the keyring using the email field in the ID token as the user ID. If the email cannot be extracted, it falls back to "default".

ยงErrors

Returns an error if the token cannot be serialized or stored.