diff --git a/object_store/src/gcp/credential.rs b/object_store/src/gcp/credential.rs index 2e89e917d17f..87f8e244f21c 100644 --- a/object_store/src/gcp/credential.rs +++ b/object_store/src/gcp/credential.rs @@ -144,7 +144,10 @@ struct TokenResponse { expires_in: u64, } -/// +/// Self-signed JWT (JSON Web Token). +/// +/// # References +/// - #[derive(Debug)] pub struct SelfSignedJwt { issuer: String, @@ -273,8 +276,9 @@ impl ServiceAccountCredentials { /// We use a scope of [`DEFAULT_SCOPE`] as opposed to an audience /// as GCS appears to not support audience /// - /// - /// + /// # References + /// - + /// - pub fn token_provider(self) -> crate::Result { Ok(SelfSignedJwt::new( self.private_key_id, @@ -371,15 +375,22 @@ impl TokenProvider for InstanceCredentialProvider { /// A deserialized `application_default_credentials.json`-file. /// -/// -/// +/// # References +/// - +/// - #[derive(serde::Deserialize)] #[serde(tag = "type")] pub enum ApplicationDefaultCredentials { - /// + /// Service Account. + /// + /// # References + /// - #[serde(rename = "service_account")] ServiceAccount(ServiceAccountCredentials), - /// + /// Authorized user via "gcloud CLI Integration". + /// + /// # References + /// - #[serde(rename = "authorized_user")] AuthorizedUser(AuthorizedUserCredentials), }