Crates.io | ci-id |
lib.rs | ci-id |
version | |
source | src |
created_at | 2024-10-29 16:14:53.637841 |
updated_at | 2024-12-03 11:15:01.881333 |
description | Ambient OIDC credentials detection on CI systems |
homepage | |
repository | https://github.com/jku/ci-id |
max_upload_size | |
id | 1427184 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
ci-id
provides easy access to ambient OIDC credentials in CI systems.
use ci_id::{detect_credentials, CIIDError};
fn main() -> Result<(), CIIDError> {
let token = detect_credentials(Some("myaudience"))?;
print!("Ambient OIDC token detected: {}", token);
Ok(())
}
See ci-id-bin crate for a simple CLI wrapper.
ci-id is based on id, a similar Python project.
Currently supported environments are:
See documentation for details on what configuration each of these environments needs.
ci-id
is licensed under the Apache 2.0 License.