Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

generate token symfony authentication api platform

Linux/Mac
curl -X POST -H "Content-Type: application/json" http://localhost/api/login_check -d '{"username":"johndoe","password":"test"}'
Windows
curl -X POST -H "Content-Type: application/json" http://localhost/api/login_check --data {"username":"johndoe","password":"test"}

output:

{
   "token" : "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXUyJ9.eyJleHAiOjE0MzQ3Mjc1MzYsInVzZXJuYW1lIjoia29ybGVvbiIsImlhdCI6IjE0MzQ2NDExMzYifQ.nh0L_wuJy6ZKIQWh6OrW5hdLkviTs1_bau2GqYdDCB0Yqy_RplkFghsuqMpsFls8zKEErdX5TYCOR7muX0aQvQxGQ4mpBkvMDhJ4-pE4ct2obeMTr_s4X8nC00rBYPofrOONUOR4utbzvbd4d2xT_tj4TdR_0tsr91Y7VskCRFnoXAnNT-qQb7ci7HIBTbutb9zVStOFejrb4aLbr7Fl4byeIEYgp2Gd7gY"
}
 
PREVIOUS NEXT
Tagged: #generate #token #symfony #authentication #api #platform
ADD COMMENT
Topic
Name
5+5 =