How to authenticate AJAX call?

前端 未结 5 1707
無奈伤痛
無奈伤痛 2020-12-21 13:44

I have designed a website which uses AJAX. I have a PHP page named store.php which accepts data sent by POST method and stores in the database.

How do I implement au

5条回答
  •  有刺的猬
    2020-12-21 14:26

    The security of Ajax requests is not a simple matter. They can be susceptible to man-in-the-middle attacks and replay attacks, to name a few. I'd recommend reading this book: http://www.amazon.com/Ajax-Security-Billy-Hoffman/dp/0321491939. It will give you lots of good information on the subject.

    As for your question, specifically: once your PHP session has been set up, those session cookies will apply to Ajax requests as well.

提交回复
热议问题