Created
January 24, 2020 17:33
-
-
Save akeller/0a2745f42aabac1321354bea78e036c5 to your computer and use it in GitHub Desktop.
CC Request Curl/bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
KEY="YOURKEY" | |
SECRET="YOURSECRET" | |
DOMAIN="YOURDOMAIN" | |
DATE=`date +%s000` | |
TMP=`echo -n "$DATE" | openssl dgst -sha256 -hmac $SECRET -binary` | |
HMACDIGEST=`echo -n "$DOMAIN" | openssl dgst -sha256 -hmac $TMP` | |
authHeader="HMAC-SHA256, Credential=$KEY, SignedHeaders=host;x-date, Signature=${HMACDIGEST}" | |
curl -X POST -H "X-Date: $DATE" -H 'Content-Type: application/json' -H "Authorization: $authHeader" https://clearcaster.c2.wowza.com/graphql --data '{ "query":"query release {\n build\n} " }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment