Azure的移动服务和Azure的网站整合 [英] Azure Mobile Services and Azure Web Site integration

查看:130
本文介绍了Azure的移动服务和Azure的网站整合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我托管在Windows Azure的网站使用ASP.NET Web.Api一个REST端点。我想允许从移动设备这个API身份验证的访问。在Azure移动服务似乎很容易验证供应商以及其他的东西,如推送通知。

I am hosting a REST endpoint using the ASP.NET Web.Api in a Windows Azure web site. I want to allow authenticated access to this api from mobile devices. The Azure mobile services seems to have easy authentication providers as well as other goodies such as push notifications.

什么是使用串联两下,网站主办的REST端点并做认证的移动服务和推送通知的有效策略?

What would be an effective strategy for using the two in tandem, the web sites to host the REST endpoint and the mobile services to do authentication and push notifications?

推荐答案

在你想什么未来,这是从应用程序启动的CRUD操作只收到推送通知,例如,如果您手动在数据库或通过输入元组code,他们将不会执行服务器脚本,因此没有通知将发送。

Before you think about anything ahead, CRUD operations which are initiated from the app only receive push notifications, for example, if you manually enter tuples in a database or through code, they won't execute the server scripts and thus no notifications will be send.

关于身份验证,您可以发送一个令牌(可以是原始的,不要指望哈希或加密,但如果你使用数据库来存储哈希)一旦移动服务验证您的用户,然后只调用Web的API。事情是服务器脚本是相当有限的,不能进行散列加密或其他单位计算,你可能期望。

About authentication, you may send a token(can be primitive, do not expect to hash or encrypt, if however you use a database to store hashes) once mobile services authenticate your user and then only call the web api's. The thing is the server scripts are fairly limited and can't perform hashing, encryption or other computes which you may expect.

这篇关于Azure的移动服务和Azure的网站整合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆