How to restrict AJAX API from unwanted use (e.g. someone performing a SELECT *)

前端 未结 2 1191
悲哀的现实
悲哀的现实 2021-01-02 14:26

I have a restaurant locater web application that mashes up the location of restaurants to a Google Maps.

I use JQuery sliders to limit the amount of restaurant to sh

2条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-02 15:05

    All the big REST API's tend to use tokenized authentication - basically before you do a REST request, you have to send some other request to the token service to fetch a token to include with your data request. Bing Maps does this, Amazon does this, Flickr does this... etc.

    I don't know too much about it other than having worked with Bing Maps. You'll need to read up on tokenized authentication with REST. Here's a blog post to get you started: http://www.naildrivin5.com/daveblog5000/?p=35

提交回复
热议问题