| Crates.io | ci-id |
| lib.rs | ci-id |
| version | 0.3.0 |
| created_at | 2024-10-29 16:14:53.637841+00 |
| updated_at | 2024-12-03 11:15:01.881333+00 |
| description | Ambient OIDC credentials detection on CI systems |
| homepage | |
| repository | https://github.com/jku/ci-id |
| max_upload_size | |
| id | 1427184 |
| size | 38,265 |
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.