pub fn save_token(token: &SavedToken) -> Result<()>Expand description
Saves a token to either a file or the system keyring.
- If
GCLOUD_IDENTITY_TOKEN_PATHis set, the token will be saved to that file path. - Otherwise, it saves to the keyring using the
emailfield 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.