api de gestion de ticket, basé sur php-crud-api. Le but est de décorrélé les outils de gestion des données, afin
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

client_bash_auth.sh 594B

12345678910111213141516
  1. #!/bin/bash
  2. # initialize cookie store
  3. cp /dev/null cookies.txt
  4. # login and store cookies in 'cookies.txt' AND retrieve the value of the XSRF token
  5. TOKEN=`curl 'http://localhost/api.php/' --data "username=admin&password=admin" --cookie-jar cookies.txt --silent`
  6. # strip the double quotes from the variable (JSON decode)
  7. TOKEN=${TOKEN//\"/}
  8. # set the XSRF token as the 'X-XSRF-Token' header AND send the cookies to the server
  9. curl 'http://localhost/api.php/posts?include=categories,tags,comments&filter=id,eq,1' --header "X-XSRF-Token: $TOKEN" --cookie cookies.txt
  10. # clean up
  11. rm cookies.txt