which is best practice to use authetication in php API -


i use following technique in api authentication in php. use post method api call. in first api have send username , password. send post.

if match generate 1 randomkey in database call secretkey. secretkey has pass post field in other api.

so question is method proper or need use other techniques ?

one of solutions json web token, here's tutorial how use it

https://www.toptal.com/web/cookie-free-authentication-with-json-web-tokens-an-example-in-laravel-and-angularjs#land-prodigious-architects


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -