{"id":16475941,"url":"https://github.com/softprops/gauthz","last_synced_at":"2025-10-27T16:31:21.824Z","repository":{"id":57633033,"uuid":"102564778","full_name":"softprops/gauthz","owner":"softprops","description":"google api authentication by way of rust :crab:","archived":false,"fork":false,"pushed_at":"2017-09-11T04:44:11.000Z","size":654,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-09-10T18:34:35.781Z","etag":null,"topics":["gcp","google"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/softprops.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-06T05:03:38.000Z","updated_at":"2019-08-10T14:25:40.000Z","dependencies_parsed_at":"2022-08-31T16:31:50.665Z","dependency_job_id":null,"html_url":"https://github.com/softprops/gauthz","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Fgauthz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Fgauthz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Fgauthz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Fgauthz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/softprops","download_url":"https://codeload.github.com/softprops/gauthz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219865979,"owners_count":16555922,"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":["gcp","google"],"created_at":"2024-10-11T12:40:54.417Z","updated_at":"2025-10-27T16:31:21.513Z","avatar_url":"https://github.com/softprops.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gauthz [![Build Status](https://travis-ci.org/softprops/gauthz.svg?branch=master)](https://travis-ci.org/softprops/gauthz) [![Coverage Status](https://coveralls.io/repos/github/softprops/gauthz/badge.svg)](https://coveralls.io/github/softprops/gauthz)\n\n\u003e google api service authentication by way of rust\n\n## [Documentation](https://softprops.github.io/gauthz)\n\n## Install\n\nAdd the following to your project's `Cargo.toml` file\n\n```toml\n[dependencies]\ngauthz = \"0.1\"\n```\n\n## Usage\n\nTypical use requires `gauthz::Tokens` configured with a tokio reactor handle\n`gauthz::Credentials` and `gauthz::Scope`s representing the access level for\nyour intended API usage.\n\n\u003e Note your `hyper::Client` _must_ be configured with tls support. Hyper doesn't\nprovide that out of the box but there are multiple crates that provide the support\n\nA `gauthz::Tokens` instance provides two interfaces `get` which returns a `Future`\nthat resolves to an access token and a `Stream` which resolves to new tokens when\nthe current token expires ( typically ) after one hour. The stream interface is\nintended for long running applications which will inevitably require access for more\nthan one hour.\n\n```rust\nextern crate futures;\nextern crate gauthz;\nextern crate tokio_core;\n\nuse futures::Future;\nuse tokio_core::reactor::Core;\n\nuse gauthz::{Credentials, Result, Scope, Tokens};\nuse gauthz::error::ErrorKind;\n\nfn run() -\u003e Result\u003cString\u003e {\n    let mut core = Core::new()?;\n    let tokens = Tokens::new(\n        \u0026core.handle(),\n        Credentials::default().unwrap(),\n        vec![Scope::CloudPlatform],\n    );\n    core.run(\n        tokens.get().map(\n            |t| t.value().to_owned()\n        )\n    )\n}\n\nfn main() {\n    match run() {\n        Ok(ok) =\u003e println!(\"{}\", ok),\n        Err(err) =\u003e println!(\"{}\", err),\n    }\n}\n```\n\nThese tokens may be used in `Authorization` HTTP headers to authenticate with\nthe Google API's the tokens are scoped to.\n\n## pronounced\n\n\u003e gawthz\n\nDoug Tangren (softprops) 2017","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftprops%2Fgauthz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftprops%2Fgauthz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftprops%2Fgauthz/lists"}