File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -556,6 +556,24 @@ Retrieve your API key using HTTP basic auth.
556556 "rubygems_api_key": "701243f217cdf23b1370c7b66b65ca97"
557557 }
558558
559+ ### POST - ` /api/v1/oidc/trusted_publisher/exchange_token `
560+
561+ Exchange an OIDC ID token for a RubyGems API key. This endpoint is intended to be used by the
562+ [ ` release-gem ` ] ( github.com/rubygems/release-gem ) GitHub Action for [ trusted publishing] ( /trusted-publishing/releasing-gems ) .
563+
564+ The request body must be a JSON object with a single key, ` jwt ` , whose value is the ID token (as a string).
565+
566+ $ curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" \
567+ -d '{"jwt": $ID_TOKEN}' \
568+ https://rubygems.org/api/v1/oidc/trusted_publisher/exchange_token"
569+
570+ {
571+ "rubygems_api_key": "rubygems_701243f217cdf23b1370c7b66b65ca97",
572+ "name": "GitHub Actions rubygems/configure-rubygems-credentials @ .github/workflows/token.yml",
573+ "scopes": ["push_rubygem"],
574+ "expires_at": "2021-01-01T00:00:00Z"
575+ }
576+
559577### GET - ` /api/v1/dependencies?gems=[COMMA DELIMITED GEM NAMES] `
560578
561579Returns a marshalled array of hashes for all versions of given gems. Each hash
You can’t perform that action at this time.
0 commit comments