Expand description
Google Cloud Platform Service Account authentication abstraction for Rust
This crate abstracts OAuth2 workflow required when exchanging a GCP Service Account JSON formatted key to either a ID token or an access token.
§Examples
let authenticator = GoogleServiceAccountAuthenticator::new_from_service_account_key_file(std::path::Path("key.json".to_string())).unwrap();
let id_token = authenticator.request_id_token("http://some.url.tld/scope-definition").await.unwrap();
println!("Authorization: Bearer {}", id_token);
Modules§
- error
- Error struct for Google’s authentication API JWT error messages
Structs§
- Google
Access Token - Representation of Google Access Token JSON
- GoogleID
Token - Representation of Google ID Token JSON
- Google
Service Account Authenticator - Authenticator service that ingest a Service Account JSON key file and communicates with Google’s authentication API to exchange it into a access token or an id token.
Enums§
- Google
Access Token Type - Variants of different Google Access Token types