From be242e98defc98230d0fdb05f7cae9a27206f50e Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 29 Jul 2020 10:26:15 -0600 Subject: [PATCH] use variable for client subject --- examples/admin-disconnect-device.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/admin-disconnect-device.sh b/examples/admin-disconnect-device.sh index b598f3b..4f030e1 100644 --- a/examples/admin-disconnect-device.sh +++ b/examples/admin-disconnect-device.sh @@ -5,6 +5,7 @@ set -u source .env TUNNEL_RELAY_API="${TUNNEL_RELAY_API:-"https://devices.example.com/api"}" +CLIENT_SUBJECT="${CLIENT_SUBJECT:-"newbie"}" echo "RELAY_SECRET: $RELAY_SECRET" TOKEN=$(go run cmd/signjwt/*.go \ @@ -15,5 +16,5 @@ TOKEN=$(go run cmd/signjwt/*.go \ echo "ADMIN TOKEN: '$TOKEN'" echo "Auth URL: $TUNNEL_RELAY_API" -curl -X DELETE "$TUNNEL_RELAY_API/subscribers/ruby" -H "Authorization: Bearer ${TOKEN}" +curl -X DELETE "$TUNNEL_RELAY_API/subscribers/${CLIENT_SUBJECT}" -H "Authorization: Bearer ${TOKEN}" echo ""