mirror of
				https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
				synced 2025-10-30 18:27:49 +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="" | token="" | ||||||
| result_file=result.json | 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_list=(firefox sensible-browser xdg-open w3m links links2 lynx youtube-dl) | ||||||
| browser="" | 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() { | login() { | ||||||
|   payload="{ \"userId\" : \"$username\" , \"password\" : \"$password\" }" |   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') |   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
	 Dmitry Dunaev
					Dmitry Dunaev