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

javascript - Why Selenium can't find an element that is graphically visible -

java - How to compare two classes -

mysql - Gateway Timeout Error on Insert 70000 record using Hibernate in Java -