{"id":15645098,"url":"https://github.com/djc/gcp_auth","last_synced_at":"2025-12-12T16:23:17.280Z","repository":{"id":41818011,"uuid":"266089855","full_name":"djc/gcp_auth","owner":"djc","description":"Minimal authentication library for Google Cloud Platform (GCP)","archived":false,"fork":false,"pushed_at":"2024-04-16T10:09:40.000Z","size":138,"stargazers_count":57,"open_issues_count":7,"forks_count":37,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-05-10T01:03:20.451Z","etag":null,"topics":["auth","authentication","gcp","google-cloud-platform","library","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/djc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-22T11:05:34.000Z","updated_at":"2024-05-29T13:26:08.900Z","dependencies_parsed_at":"2023-02-08T12:02:10.886Z","dependency_job_id":"549928c2-ca81-4251-926e-8a0000fa0ffc","html_url":"https://github.com/djc/gcp_auth","commit_stats":{"total_commits":173,"total_committers":19,"mean_commits":9.105263157894736,"dds":0.4508670520231214,"last_synced_commit":"26c6141f4f2e9369e4b15800dc1e54a0eb12accc"},"previous_names":["hrvolapeter/gcp_auth"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djc%2Fgcp_auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djc%2Fgcp_auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djc%2Fgcp_auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djc%2Fgcp_auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/djc","download_url":"https://codeload.github.com/djc/gcp_auth/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248990470,"owners_count":21194761,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auth","authentication","gcp","google-cloud-platform","library","rust"],"created_at":"2024-10-03T12:04:30.699Z","updated_at":"2025-12-12T16:23:12.215Z","avatar_url":"https://github.com/djc.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GCP Auth\n\n[![Crates.io][crates-badge]][crates-url]\n[![Documentation][docs-badge]][docs-url]\n[![MIT licensed][mit-badge]][mit-url]\n\n[crates-badge]: https://img.shields.io/crates/v/gcp_auth.svg\n[crates-url]: https://crates.io/crates/gcp_auth\n[docs-badge]: https://docs.rs/gcp_auth/badge.svg\n[docs-url]: https://docs.rs/gcp_auth\n[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg\n[mit-url]: LICENSE\n\nGCP auth provides authentication using service accounts Google Cloud Platform (GCP)\n\nGCP auth is a simple, minimal authentication library for Google Cloud Platform (GCP)\nproviding authentication using service accounts. Once authenticated, the service\naccount can be used to acquire bearer tokens for use in authenticating against GCP\nservices.\n\nThe library supports the following methods of retrieving tokens in the listed priority order:\n\n1. Reading custom service account credentials from the path pointed to by the\n   `GOOGLE_APPLICATION_CREDENTIALS` environment variable. Alternatively, custom service\n   account credentials can be read from a JSON file or string.\n2. Look for credentials in `.config/gcloud/application_default_credentials.json`;\n   if found, use these credentials to request refresh tokens. This file can be created\n   by invoking `gcloud auth application-default login`.\n3. Use the default service account by retrieving a token from the metadata server.\n4. Retrieving a token from the `gcloud` CLI tool, if it is available on the `PATH`.\n\nFor more detailed information and examples, see the [docs][docs-url].\n\nThis crate does not currently support Windows.\n\n## Simple usage\n\nThe default way to use this library is to select the appropriate token provider using `provider()`. It will\nfind the appropriate authentication method and use it to retrieve tokens.\n\n```rust,no_run\nlet provider = gcp_auth::provider().await?;\nlet scopes = \u0026[\"https://www.googleapis.com/auth/cloud-platform\"];\nlet token = provider.token(scopes).await?;\n```\n\n# License\n\nParts of the implementation have been sourced from [yup-oauth2](https://github.com/dermesser/yup-oauth2).\n\nLicensed under [MIT license](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjc%2Fgcp_auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdjc%2Fgcp_auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjc%2Fgcp_auth/lists"}