add example for removing device

This commit is contained in:
AJ ONeal 2020-07-20 16:21:27 -06:00
parent 7c4b65004d
commit 242051395e
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
#!/bin/bash
set -e
set -u
source .env
TUNNEL_RELAY_API="${TUNNEL_RELAY_API:-"https://devices.example.com/api"}"
echo "RELAY_SECRET: $RELAY_SECRET"
TOKEN=$(go run cmd/signjwt/*.go \
--vendor-id "$VENDOR_ID" \
--secret "$RELAY_SECRET" \
--machine-ppid "$RELAY_SECRET"
)
echo "ADMIN TOKEN: '$TOKEN'"
echo "Auth URL: $TUNNEL_RELAY_API"
curl -X DELETE "$TUNNEL_RELAY_API/subscribers/ruby" -H "Authorization: Bearer ${TOKEN}"
echo ""