Ingen beskrivning

gdias 785d121e90 try fix CORS 11 månader sedan
bin 4e165123f2 feat: category endpoints 11 månader sedan
controllers 5f6f38c345 removed float from product price 11 månader sedan
libs 6fd57b54dd full generic rest http api template for framework x with hmac auth and jwt auth 11 månader sedan
middlewares 785d121e90 try fix CORS 11 månader sedan
migrations 5f6f38c345 removed float from product price 11 månader sedan
models 8c492b8497 cors fix on index.php and /login now return role_id 11 månader sedan
public 8c492b8497 cors fix on index.php and /login now return role_id 11 månader sedan
.env.example 6fd57b54dd full generic rest http api template for framework x with hmac auth and jwt auth 11 månader sedan
.gitignore 6fd57b54dd full generic rest http api template for framework x with hmac auth and jwt auth 11 månader sedan
README.md cb5ebd5061 migration att 11 månader sedan
composer.json 6fd57b54dd full generic rest http api template for framework x with hmac auth and jwt auth 11 månader sedan
composer.lock 6fd57b54dd full generic rest http api template for framework x with hmac auth and jwt auth 11 månader sedan
package-lock.json 223d6954d9 CORS now allow all Origins and all Headers 11 månader sedan
package.json 223d6954d9 CORS now allow all Origins and all Headers 11 månader sedan

README.md

setup

  1. run ./bin/setup

  2. run composer install

  3. run php -S localhost:8000 -t public

  4. on another terminal run curl -X POST http://localhost:8000/register -H "Content-Type: application/json" -d '{"username":"du","email":"teste@email.com", "password":"du123456", "company_id":1, "role_id":1}'

  5. on the other terminal run ./bin/testgetjwt

  6. on the other terminal run export JWT=<jwt tooken>

  7. on the other terminal run ./bin/testusejwt

  8. on the other terminal run ./bin/testhmac