Duplicate functions used in `utils` and `user`
spencerwooo opened this issue · 0 comments
spencerwooo commented
Lines 10 to 52 in cb26cc1
Lines 63 to 76 in cb26cc1
The latter API seems to have covered the former functionality, as in when calling:
GET /cgi-bin/rad_user_info?callback=jsonp HTTP/1.1
Host: 10.0.0.55
When logged in, the API responds with:
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 03 Feb 2023 06:29:43 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 510
Connection: close
Srun-Server: SRunCGIAuthIntfSvr V1.18 B20220802
X-Frame-Options: SAMEORIGIN
{"ServerFlag":4294967040,"add_time":"<REDACTED>","all_bytes":"<REDACTED>","bytes_in":"<REDACTED>","bytes_out":"<REDACTED>","checkout_date":0,"domain":"","error":"ok","group_id":"7","keepalive_time":"<REDACTED>","online_ip":"10.108.11.185","products_name":"学生-10元含200GB不限速流量-2022","real_name":"","remain_bytes":"<REDACTED>","remain_seconds":0,"sum_bytes":"<REDACTED>","sum_seconds":10754,"sysver":"1.01.20220802","user_balance":10,"user_charge":0,"user_mac":"","user_name":"<REDACTED>","wallet_balance":0}
Outer wrap jsonp(
and )
omitted for better formatting in GitHub.
TODO:
- Check what the endpoint responds when not logged in.
- Check whether
ac_id
is really necessary when calling the login or logout endpoint.