From f62375ae54f8add8bc6316bfe29185907e0ea29b Mon Sep 17 00:00:00 2001 From: Kim Date: Thu, 23 Mar 2023 16:58:26 +0100 Subject: [PATCH] added token generator and getting token from token.json --- csharp/App/OpenVpnCertificatesServer/newToken.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/csharp/App/OpenVpnCertificatesServer/newToken.sh b/csharp/App/OpenVpnCertificatesServer/newToken.sh index 31f5fa90a..22f34698f 100755 --- a/csharp/App/OpenVpnCertificatesServer/newToken.sh +++ b/csharp/App/OpenVpnCertificatesServer/newToken.sh @@ -1,5 +1,5 @@ #!/bin/bash -## USAGE: ./newToken.sh -u USERNAME -p PASSWORD +## USAGE: ./newToken.sh -u Username -p Password -n UniqueTokenName while getopts u:p:n: flag @@ -18,7 +18,7 @@ response=$(curl --request POST \ echo -n '{"bearer' > token.json token=$(echo $response | jq ".token") -#echo ${token:1:-1} + uid=$(echo $response | jq ".idUser") echo -n ${response:7:-1} >> token.json