Closed billy482 closed 8 years ago
Example to do authentication with curl:
curl -v -X POST -H 'Content-type: application/json' -d '{"login":"foo","password":"bar"}' http://localhost/ftp-adm-api/api/v1/auth/
and the result can be:
{"message":"Logged in","user_id":1}
To log out:
curl -v -X DELETE -b PHPSESSID=j1dsd86rm2egf2h80pt5prokn1 http://localhost/ftp-adm-api/api/v1/auth/
Where PHPSESSID should be retrieved from previous http response. And the result can be:
{"message":"Logged out"}
See commit : d91732677efaf8f64845bc8ca58fbea9c8b5ab92
Example to do authentication with curl:
and the result can be:
To log out:
Where PHPSESSID should be retrieved from previous http response. And the result can be: