Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/auth/src/signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@
//! sign content. Use [crate::credentials::Builder::build_signer]
//! to create a `Signer` from loaded credentials.
//!
//! ## Example: Creating a Signer using Application Default Credentials (ADC)
//! ## Example: Creating a Signer using [Application Default Credentials] (ADC)
//!
//! This is the recommended way for most applications. It automatically finds
//! credentials from the environment.
//! credentials from the environment. See how [Application Default Credentials]
//! works.
//!
//! ```
//! use google_cloud_auth::credentials::Builder;
Expand All @@ -46,6 +47,12 @@
//! environments where network access is restricted and performance is
//! critical.
//!
//! <div class="warning">
//! <strong>Caution:</strong> Service account keys are a security risk if not managed correctly.
//! See <a href="https://docs.cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys">
//! Best practices for managing service account keys</a> for more information.
Comment on lines +50 to +53

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use markdown inside the <div>?

Suggested change
//! <div class="warning">
//! <strong>Caution:</strong> Service account keys are a security risk if not managed correctly.
//! See <a href="https://docs.cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys">
//! Best practices for managing service account keys</a> for more information.
//! <div class="warning">
//! **Caution:** Service account keys are a security risk if not managed correctly.
//! See [Best practices for managing service account keys] for more information.

And then add this at the bottom?

/// [Best practices for managing service account keys]: https://docs.cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it doesn't render markdown inside divs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, interesting, I tried to use the markdown syntax and just assumed was not supported. Will try that trick from the docs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, I wonder if there a version of rust that supports that, because I tried this and it is still not rendering:

//! <div class="warning">
//!
//!     **Caution:** Service account keys are a security risk if not managed correctly.
//!     See [Best practices for managing service account keys] for more information.
//!
//! </div>
Screenshot 2026-01-09 at 09 39 53

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To get closer to the rendering at the docs.rs site use:

rustyp update nightly
cargo install --locked cargo-docs-rs
cargo +nightly docs-rs --package google-cloud-storage
Image

But then again, it is not that important.

//! </div>
//!
//! ```
//! use google_cloud_auth::credentials::service_account::Builder;
//! use google_cloud_auth::signer::Signer;
Expand All @@ -58,6 +65,7 @@
//! # });
//! ```
//!
//! [Application Default Credentials]: https://docs.cloud.google.com/docs/authentication/application-default-credentials
//! [Signed URLs]: https://cloud.google.com/storage/docs/access-control/signed-urls

use std::sync::Arc;
Expand Down
Loading