Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Azure-仅针对所有者的数据_Azure_Windows 8_Sandbox_Authentication - Fatal编程技术网

Azure-仅针对所有者的数据

Azure-仅针对所有者的数据,azure,windows-8,sandbox,authentication,Azure,Windows 8,Sandbox,Authentication,我使用Azure Mobile服务将我的应用程序用户的数据保存到我的Windows 8应用商店应用程序中。我想在app store中发布应用程序,但为此,我必须确保每个用户只能获得自己的数据。如果10个人将数据上传到my Azure服务,他们应该只能获取自己的数据。我如何才能做到这一点?您应该检查,它将向您展示如何按用户划分数据 基本上,对于这样的插入操作,您必须在服务器端(直接在移动服务脚本部分的Azure门户中)编写自定义脚本 function insert(item, user, requ

我使用Azure Mobile服务将我的应用程序用户的数据保存到我的Windows 8应用商店应用程序中。我想在app store中发布应用程序,但为此,我必须确保每个用户只能获得自己的数据。如果10个人将数据上传到my Azure服务,他们应该只能获取自己的数据。我如何才能做到这一点?

您应该检查,它将向您展示如何按用户划分数据

基本上,对于这样的插入操作,您必须在服务器端(直接在移动服务脚本部分的Azure门户中)编写自定义脚本

function insert(item, user, request) {
  item.userId = user.userId;    
  request.execute();
}
function read(query, user, request) {
   query.where({ userId: user.userId });    
   request.execute();
}
像这样的读取操作

function insert(item, user, request) {
  item.userId = user.userId;    
  request.execute();
}
function read(query, user, request) {
   query.where({ userId: user.userId });    
   request.execute();
}
但首先,您必须向应用程序添加授权,如图所示