fetch_error() = {oidc_token_request_failed, Status::non_neg_integer()} | {oidc_token_unavailable, Reason::term()} | oidc_token_missing | json_unavailable
provider() = {github_actions, #{url := binary(), request_token := binary()}}
| detect_provider/0 | Detects the CI provider issuing OIDC tokens for the current job, if any. |
| fetch_token/3 | Fetches an OIDC token scoped to Audience from Provider, through the build tool's HTTP adapter, so the request uses the same proxy settings and CA certificates as the rest of the build tool's traffic. |
detect_provider() -> {ok, provider()} | none
Detects the CI provider issuing OIDC tokens for the current job, if any.
Only GitHub Actions is supported today, detected through theACTIONS_ID_TOKEN_REQUEST_URL and ACTIONS_ID_TOKEN_REQUEST_TOKEN
environment variables, which GitHub only sets when the job has the
id-token: write permission.
fetch_token(Config::r3_hex_core:config(), Provider::provider(), Audience::binary()) -> {ok, binary()} | {error, fetch_error()}
Fetches an OIDC token scoped to Audience from Provider, through the build tool's HTTP adapter, so the request uses the same proxy settings and CA certificates as the rest of the build tool's traffic.
Generated by EDoc