Registry / auth / gcp-auth

gcp-auth

JSON →
library0.12.6rscratesunverified

Google Cloud Platform authentication using default and custom service accounts.

# Cargo.toml [dependencies] gcp_auth = "0.12.6"
INSTALL
IMPORT
SIG · GCP-AUTH
G
gcp-auth
authrustv0.12.6
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AuthenticationManager
use gcp_auth::AuthenticationManager;

Authenticate with GCP using default credentials.

use gcp_auth::AuthenticationManager; #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { let manager = AuthenticationManager::new().await?; let token = manager.get_token().await?; println!("Token: {}", token.as_str()); Ok(()) }
Debug
Known issues
gotchaRequires a Tokio async runtime
fix
Add tokio as a dependency and use #[tokio::main] or another async runtime.
affects: >=0.12.0
Upgrade
Version history
0.12.6latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
24 hits · last 30 days
node
20
Amazon
1
OpenAI (training)
1
Resources
gcp-auth — cargo add gcp-auth · libregistry