ChyroBroadcast / ftp-adm-api

Ftp Admin Backend
GNU Affero General Public License v3.0
0 stars 0 forks source link

Add enough files to start backend #1

Closed billy482 closed 8 years ago

billy482 commented 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"}
billy482 commented 8 years ago

See commit : d91732677efaf8f64845bc8ca58fbea9c8b5ab92