javascript - How to Secure ASP.NET Web API with Cross Domain AJAX Calls? -
i want create api @ www.mydomain.com accessible public websites www.customer1.com , www.customer2.com. these public websites display each customers inventory , not have login features. use ajax calls read data api.
how can secure api can accessed via ajax different domains no 1 can access api able scrape of customers data , of inventory?
i have tried thinking of different solutions on own either require people login public websites (which isn't option) or require secret "key" displayed publicly in browser source code stolen.
any ideas appreciated.
thanks!
p.s. obstacles going run using javascript & cors need now?
anything accessible without authentication browser definition insecure, can't stop that. best bet have have relationship owner of customer1.com
, customer2.com
- server apps 2 websites make http call , authenticate service. going way avoids cors issues you're talking about.
if you've designed client functionality, can still without change javascript - have point customer1.com
ajax call instead of api, , customer1.com
accept request , act proxy api. aside authentication, rest of request , response pass-throughs api.
Comments
Post a Comment