Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update debugging messages
Browse files Browse the repository at this point in the history
botanical committed Jan 15, 2025
1 parent 58dc10f commit 0460abf
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -265,10 +265,6 @@ jobs:
# Generate JWT
HEADER='{"alg":"RS256","typ":"JWT"}'
PAYLOAD='{"iat":'$(date +%s)',"exp":'$(($(date +%s)+540))',"iss":'"$APP_ID"'}'
# Debug: Validate JSON
echo "Validating Header and Payload JSON..."
echo $HEADER | jq . || { echo "Invalid Header JSON"; exit 1; }
echo $PAYLOAD | jq . || { echo "Invalid Payload JSON"; exit 1; }
# Base64 URL-safe encode header and payload
BASE64_HEADER=$(printf '%s' "$HEADER" | openssl base64 -A | tr -d '=' | tr '/+' '_-')
@@ -284,8 +280,8 @@ jobs:
JWT_SIGNATURE=$(printf '%s' "$JWT_HEADER_PAYLOAD" | openssl dgst -sha256 -sign app.pem | openssl base64 -A | tr -d '=' | tr '/+' '_-')
# Debug: Check if JWT was created
if [ -z "$JWT" ]; then
echo "Error: Failed to create JWT!"
if [ -z "$JWT_SIGNATURE" ]; then
echo "Error: Failed to create JWT_SIGNATURE!"
exit 1
fi
JWT="$JWT_HEADER_PAYLOAD.$JWT_SIGNATURE"

0 comments on commit 0460abf

Please sign in to comment.