java - Secure jsonp ajax calls -
i have developed restful web-service returns jsonp objects. using web-service in simple html page using ajax calls. means @ client side there html page access web-service. no server used @ client side. running page browser. problem can access web-service have implemented. want make secure kind of authentication. have read solution send token along request @ client side don't have server or anything, simple html page. please me solution secure web-service. javascipt function call webseive: function calculatepremium(investmentamount,month, premium) { var url = "http://192.1.200.107:8080/webresources/avestwebservice/getpremium"; var payloaddata = { amount: $("#"+investmentamount).val(), period: $("#"+month).val() }; $.ajax({ type: "get", url: url, cache:false, crossdomain:true, data: payloaddata, datatype: "jsonp", success: function (data,textstatus,jqxhr) { $("#...