We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b233bdb commit 74d4e6dCopy full SHA for 74d4e6d
1 file changed
.github/actions/artifactory-oidc/action.yml
@@ -44,6 +44,13 @@ runs:
44
echo "::error::Failed to obtain GitHub OIDC token"; exit 1
45
fi
46
47
+ decode_seg() { local s="${1}"; local m=$(( ${#s} % 4 )); [ $m -ne 0 ] && s="${s}$(printf '=%.0s' $(seq 1 $((4-m))))"; echo "$s" | tr '_-' '/+' | base64 -d 2>/dev/null; }
48
+ PAYLOAD=$(decode_seg "$(echo "$OIDC_JWT" | cut -d. -f2)")
49
+ echo "OIDC token claims:"
50
+ echo " sub = $(echo "$PAYLOAD" | jq -r '.sub')"
51
+ echo " aud = $(echo "$PAYLOAD" | jq -r '.aud')"
52
+ echo " iss = $(echo "$PAYLOAD" | jq -r '.iss')"
53
+
54
RESP=$(curl -sS "${ARTIFACTORY_URL}/access/api/v1/oidc/token" \
55
-H 'Content-Type: application/json' \
56
-d "{\"grant_type\":\"urn:ietf:params:oauth:grant-type:token-exchange\",
0 commit comments