C2DM服务器。我们是否应该使用OAuth呢? [英] C2DM server. Should we use OAuth now?

查看:177
本文介绍了C2DM服务器。我们是否应该使用OAuth呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我实施C2DM我的Andr​​oid应用程序。客户端(安卓)进行得很顺利,但我在实现服务器端有点困惑。

I'm implementing C2DM for my Android app. Client side (Android) went well, but I'm little bit confused on implementing server side.

我的服务器是C#/。NET。官方单证链接到404,当涉及到身份验证: https://developers.google.com/android/c2dm/#handling_reg

My server is C#/.NET. Official documentations links to 404 when it comes to authentication: https://developers.google.com/android/c2dm/#handling_reg

我发现了另一个页面: https://developers.google.com/accounts/docs/AuthForInstalledApps

I found another page: https://developers.google.com/accounts/docs/AuthForInstalledApps

但它说,德precated。所以,我不知道现在该做什么。去pca​​ted德$ P $的功能或学习如何使用OAuth? (从来没有这样做过)

But it says deprecated. So, I'm not sure what to do now. Go with deprecated functionality or learn how to use OAuth? (never done this before)

如果我去与OAuth的 - 我应该怎么传递在这里: 授权:?的GoogleLogin AUTH = [的auth_token]

If I go with OAuth - what should I pass in here: Authorization: GoogleLogin auth=[AUTH_TOKEN] ?

在这个问题上的任何指针将AP preciated

Any pointers on this subject will be appreciated

这是谷歌最近的文章听起来像客户端登录是要走的路... 的http://android-developers.blogspot.com/2012/04/android-c2dm-client-login-key.html

Recent post from Google sounds like Client Login is the way to go... http://android-developers.blogspot.com/2012/04/android-c2dm-client-login-key.html

推荐答案

我最近开始建立C2DM自己,我有你没有,当我看到德precation通知同样的困惑。我最好的理解是,虽然谷歌正在向OAuth的2对大多数的服务,去precating的ClientLogin,C2DM仍然使用ClientLogin的,所以这就是你必须在这种情况下使用。

I recently started setting up C2DM myself, and I had the same confusion you did when I saw the deprecation notice. My best understanding is that while Google is moving to OAuth 2 for most services, deprecating ClientLogin, C2DM still uses ClientLogin, so that's what you have to use in this case.

理由:

  • 当然一切都在(上最新和经常更新) C2DM文档明确指的ClientLogin,强烈暗示该服务依赖于这个特定的授权方法。的ClientLogin明确提到的11倍,而没有提及到的OAuth或认证的任何其它可能的手段。
  • Absolutely everything in the (up-to-date and frequently updated) C2DM documentation explicitly refers to ClientLogin, strongly suggesting that the service is tied to this particular authorization method. ClientLogin is explicitly mentioned 11 times, while no mention is made to OAuth or to any other possible means of authentication.

总之,我认为,你必须使用的ClientLogin的C2DM应该忽视这样一个事实,这是pcated其他谷歌服务,这是通过OAuth的更好的服务去$ P $。它不会出现任何事情比其他的ClientLogin拟与C2DM在可预见的未来使用。

In short, I believe that you must use ClientLogin for C2DM and should ignore the fact that it is deprecated for other Google services that are better served by OAuth. It doesn't appear that anything other than ClientLogin is intended to be used with C2DM in the foreseeable future.

这篇关于C2DM服务器。我们是否应该使用OAuth呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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