Crates.io | ci-id |
lib.rs | ci-id |
version | 0.2.1 |
source | src |
created_at | 2024-10-29 16:14:53.637841 |
updated_at | 2024-11-05 10:09:02.163548 |
description | Ambient OIDC credentials detection on CI systems |
homepage | |
repository | https://github.com/jku/ci-id |
max_upload_size | |
id | 1427184 |
size | 38,252 |
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.