Merge 2662b5f348b3dbfbb10991269cac171e1b177043 into 3d8b682380773f01df0e5abc2ef582c30c663010

This commit is contained in:
pru-mike 2025-06-08 15:15:33 +00:00 committed by GitHub
commit e44455408b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -140,7 +140,7 @@ _nic_get_authtoken() {
res=$(_post "grant_type=password&username=${NIC_Username}&password=${NIC_Password}&scope=%28GET%7CPUT%7CPOST%7CDELETE%29%3A%2Fdns-master%2F.%2B" "$NIC_Api/oauth/token" "" "POST") res=$(_post "grant_type=password&username=${NIC_Username}&password=${NIC_Password}&scope=%28GET%7CPUT%7CPOST%7CDELETE%29%3A%2Fdns-master%2F.%2B" "$NIC_Api/oauth/token" "" "POST")
if _contains "$res" "access_token"; then if _contains "$res" "access_token"; then
_auth_token=$(printf "%s" "$res" | cut -d , -f2 | tr -d "\"" | sed "s/access_token://") _auth_token=$(printf "%s" "$res" | sed -r "s/^.*access_token\":\"([^\"]+)\".*$/\1/")
_info "Token received" _info "Token received"
_debug _auth_token "$_auth_token" _debug _auth_token "$_auth_token"
return 0 return 0