pub fn from_file(path: &AbsoluteSystemPath) -> Result<Self, Error> {
        #[derive(Deserialize)]
        struct TokenWrapper {
            token: Option<String>,
        }

        match path.read_existing_to_string()? {
            Some(content) => {
                let wrapper = serde_json::from_str::<TokenWrapper>(&content).map_err(|err| {
                    Error::InvalidTokenFileFormat {
                        path: path.to_string(),
                        source: err,
                    }
                })?;
                if let Some(token) = wrapper.token {
                    Ok(Self::Existing(token))
                } else {
                    Err(Error::TokenNotFound)
                }
            }
            None => Err(Error::TokenNotFound),
        }
    }
Reads a token from a file. If the file is a JSON object with a
`token` field, we read that in. If no such field exists, we error out.

## Errors
* `Error::TokenNotFound` - If the file does not exist.
* `Error::InvalidTokenFileFormat` - If the file does not contain a
properly formatted JSON object with a `token` field.
crates/turborepo-auth/src/lib.rs