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

ios - Is 'init' forbidden as *part* of a variable name? -

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

angular - Angular2 Router: Cannot find primary outlet to load 'HomeComponent' -