Skip to content

Commit

Permalink
tools/example.sh: Set expire based on current time
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Collins <[email protected]>
  • Loading branch information
benmcollins committed Feb 11, 2025
1 parent 4b0816d commit ef5560a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ fi

TOKEN=jwt-test-token

EXP="$(date -d '+7 days' +%s)"


echo Generating token
jwt-generate -k "${JWK}" \
-c s:group=staff \
-c b:admin=false \
-c s:iss=disk.swissdisk.com \
-c s:user=bcollins \
-c i:exp=1768402249 > ${TOKEN}
-c i:exp=${EXP} > ${TOKEN}

if command -v jq > /dev/null; then
JQ="--print=jq -C"
Expand Down

0 comments on commit ef5560a

Please sign in to comment.