从Iphone Native客户端向Google App Engine进行身份验证 [英] Authenticate with Google App Engine from an Iphone Native Client

查看:148
本文介绍了从Iphone Native客户端向Google App Engine进行身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个Iphone游戏,用户可以使用其Facebook凭据登录,并使用在Google App Engine上运行的服务器进行身份验证。我已经得到Facebook连接工作在iPhone和Google App Engine。但是,似乎Facebook连接的iPhone只认证你与Facebook的服务器,并允许您访问的Facebook Api从。

I want to create an Iphone game where users can log in with their facebook credentials and authenticate with my server running on Google App Engine. I have gotten Facebook connect working on both the iPhone and Google App Engine. However, it seems that Facebook connect for the iPhone only authenticates you with Facebook's server and allows you to access the Facebook Api from .

我想这样做的原因是,以便我可以存储与GAE上的用户帐户相关联的额外用户数据,但也可以让他们使用自己的Facebook凭据登录。

The reason I want to do this, is so that I can store extra user data associated with a user account on GAE, but also have them log in with their Facebook credentials.

可以使用他们的Facebook凭据使用iPhone本机客户端,但认证我的服务器?看起来像Farmville for iPhone做这样的事情。

Is it possible to authenticate the user using their Facebook credentials using an iPhone native client, but authenticate with my server? It seems like Farmville for the iPhone does something like this.

有什么想法怎么做?

推荐答案

这可以通过您的GAE应用程序上的中间Facebook API代理。

This is possible via an intermediate Facebook API proxy on your GAE app.

通过一些代码,经典API的 auth.getSession auth_token generate_session_secret 提供由客户端,当然格式 XML

Skimming through some code I have that does this, I call the classic API's auth.getSession with auth_token and generate_session_secret provided by the client, and of course format is XML.

http://developers.facebook.com/docs/reference/rest/ auth.getSession /

基本上会发生什么情况,客户端登录,获得身份验证令牌,发送到中间代理,然后请求Facebook会话使用该令牌,将其返回给Connect客户端。

Essentially what happens is that the client logs in, gets an authentication token, posts that to the intermediate proxy which then asks Facebook for a session using that token, returning that to the Connect client.

这篇关于从Iphone Native客户端向Google App Engine进行身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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