mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
synced 2025-10-30 10:22:22 +00:00
Merge pull request #32 from Telecominfraproject/feature/wifi-6183--cli-review
[WIFI-6183] Chg: cli review and usage enhancement
This commit is contained in:
@@ -34,11 +34,20 @@ fi
|
||||
|
||||
token=""
|
||||
result_file=result.json
|
||||
username="script.runner@arilia.com"
|
||||
password="NoMoreN00bs#"
|
||||
browser_list=(firefox sensible-browser xdg-open w3m links links2 lynx youtube-dl)
|
||||
browser=""
|
||||
|
||||
if [ -z ${OWSEC_USERNAME+x} ]; then
|
||||
username="script.runner@arilia.com"
|
||||
else
|
||||
username=${OWSEC_USERNAME}
|
||||
fi
|
||||
if [ -z ${OWSEC_PASSWORD+x} ]; then
|
||||
password="Snoopy99!!!"
|
||||
else
|
||||
password=${OWSEC_PASSWORD}
|
||||
fi
|
||||
|
||||
login() {
|
||||
payload="{ \"userId\" : \"$username\" , \"password\" : \"$password\" }"
|
||||
token=$(curl ${FLAGS} -X POST -H "Content-Type: application/json" -d "$payload" "https://${OWSEC}/api/v1/oauth2" | jq -r '.access_token')
|
||||
|
||||
Reference in New Issue
Block a user