Aha! I understand what you're saying. Here's what I tried this morning:
(in an Emacs buffer so sorry for the Internet line endings showing up odd in machine format):
Everything looked ok. I don't know what I got wrong. But, this is further than I've gotten before. I now have an "Invalid Credentials" message. I just need to know what it will accept as credentials. If I could see the function i() being called somewhere, or everywhere, in that app...js file, I could maybe figure out what it wants.
I think I forgot AuthCookie. Is that "-c authcookie.txt"?
(in an Emacs buffer so sorry for the Internet line endings showing up odd in machine format):
Code:
! curl -s -i -v -H 'Content-Type: application/json' -X POST -d '{"username":"[email protected]","password":"GATEWAYSERIALNUMBER","force_sm_off":"false"}' http://192.1.2.3/api/login/Basic
* Trying 192.1.2.3...
* Connected to 192.1.2.3 (192.1.2.3) port 80 (#0)
> POST /api/login/Basic HTTP/1.1^M
> Host: 192.1.2.3^M
> User-Agent: curl/7.42.1^M
> Accept: */*^M
> Content-Type: application/json^M
> Content-Length: 77^M
> ^M
} [77 bytes data]
* upload completely sent off: 77 out of 77 bytes
< HTTP/1.1 401 Unauthorized^M
< Access-Control-Allow-Credentials: false^M
< Access-Control-Allow-Headers: X-Requested-With, X-HTTP-Method-Override, Content-Type, Accept, Accept-Encoding, Authorization^M
< Access-Control-Allow-Methods: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS^M
< Access-Control-Allow-Origin: *^M
< Access-Control-Max-Age: 86400^M
< Content-Type: application/json^M
< X-Content-Type-Options: nosniff^M
< Date: Wed, 23 Aug 2017 09:25:07 GMT^M
< Content-Length: 66^M
< ^M
{ [66 bytes data]
* Connection #0 to host 192.1.2.3 left intact
HTTP/1.1 401 Unauthorized^M
Access-Control-Allow-Credentials: false^M
Access-Control-Allow-Headers: X-Requested-With, X-HTTP-Method-Override, Content-Type, Accept, Accept-Encoding, Authorization^M
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS^M
Access-Control-Allow-Origin: *^M
Access-Control-Max-Age: 86400^M
Content-Type: application/json^M
X-Content-Type-Options: nosniff^M
Date: Wed, 23 Aug 2017 09:25:07 GMT^M
Content-Length: 66^M
^M
{"code":401,"error":"Invalid Credentials","message":"Login Error"}
Everything looked ok. I don't know what I got wrong. But, this is further than I've gotten before. I now have an "Invalid Credentials" message. I just need to know what it will accept as credentials. If I could see the function i() being called somewhere, or everywhere, in that app...js file, I could maybe figure out what it wants.
I think I forgot AuthCookie. Is that "-c authcookie.txt"?