接口示例 /api/v1.auth/login : 登录接口

 

  1. [root@frmstock frmtag]#
  2. [root@frmstock frmtag]# timestamp=`date +%s` ; passwd=`echo -n "d19638d0-ea32-11ed-8a52-000c2921ab31:$timestamp" | md5sum | cut -d " " -f 1`;curl -v -k "https://tag.frmstock.org.cn/index.php/api/v1.auth/login" -X POST -H "timestamp: $timestamp" -d "appid=12345678-1234-1234-1234-123456789012&password=$passwd"
  3. * About to connect() to tag.frmstock.org.cn port 443 (#0)
  4. * Trying 106.14.219.145...
  5. * Connected to tag.frmstock.org.cn (106.14.219.145) port 443 (#0)
  6. > POST /index.php/api/v1.auth/login HTTP/1.1
  7. > User-Agent: curl/7.29.0
  8. > Host: tag.frmstock.org.cn
  9. > Accept: */*
  10. > timestamp: 1683275107
  11. > Content-Length: 84
  12. > Content-Type: application/x-www-form-urlencoded
  13. >
  14. * upload completely sent off: 84 out of 84 bytes
  15. < HTTP/1.1 200 OK
  16. < Server: nginx/1.20.1
  17. < Date: Fri, 05 May 2023 08:25:07 GMT
  18. < Content-Type: application/json; charset=utf-8
  19. < Transfer-Encoding: chunked
  20. < Connection: keep-alive
  21. < X-Powered-By: PHP/7.1.33
  22. < Set-Cookie: PHPSESSID=3f8d519d4e6ac8da868a248a5801730b; path=/
  23. < Expires: Thu, 19 Nov 1981 08:52:00 GMT
  24. < Cache-Control: no-store, no-cache, must-revalidate
  25. < Pragma: no-cache
  26. <
  27. * Connection #0 to host tag.frmstock.org.cn left intact
  28. {"status":0,"message":"登录成功"}
  29. [root@frmstock frmtag]#