对身份验证应用程序引擎从Android应用程序与联合登录(OpenID的)应用程序、身份验证、引擎、OpenID

2023-09-05 02:52:38 作者:裤裆里有暗器

我跟着尼克·约翰逊对Authenticating针对应用程序引擎从Android的

I've followed Nick Johnson's tutorial on Authenticating against App Engine from Android

反正是有得到相同的工作流(没有网络的登入)与联合登录(即使支持仅限于谷歌帐户)?

Is there anyway to get the same workflow (no web signin) with Federated Login (even if support is limited to Google Accounts)?

的其他信息的

目前的设置包括:

在App Engine的 UserService的配置为联合登录(openId..gmail,AOL,MySpace的?......) 的Facebook(OAuth的) 在微博(OAuth的) App Engine's UserService configured for federated login (openId..gmail, aol, myspace?,...) Facebook (OAuth) Twitter (OAuth)

所有的认证类型被包装在一个 UserService的,这样我就可以叫 UserService.getCurrentUser()(类似到AppEngine上的UserService的,但支持的Twitter和Facebook)。

All the authentication types are wrapped in a UserService, so I can call UserService.getCurrentUser() (Similar to Appengine's UserService, but supports twitter, and facebook).

帐户可以有多种身份验证方法连接在一起。

Accounts can have multiple authentication methods linked together.

目前的客户都是基于网络的,事情都工作很好。 :D

So far the clients are all web based, and things are working nicely. :D

我想:

添加一个公共的API(用于Web和本地移动应用程序), 在内部使用这个API的原生移动应用程序。

有什么选择?

我在想限制身份验证谷歌帐户的Andr​​oid应用程序,避免了基于Web的登录屏幕的希望。即便如此这将是很好,支持Facebook和Twitter的网络API。

I was thinking of limiting authentication to Google Accounts for the Android App, in hopes of avoiding the web based sign in screen. Even so it would be nice to support facebook and twitter for the web Api.

推荐答案

没有,OpenID是一个基于浏览器的身份验证标准 - 它依赖于用户被引导到外部认证页面,然后返回到应用页面

No, OpenID is a browser-based auth standard - it relies on user being directed to external auth page and then back to app page.

您可以流畅的用户体验,通过的WebView A 对话框内做到这一点。见一个例子实施 LeanEngine 开源项目:服务器和客户端。服务器是一个有点复杂,因为它同时支持Facebook和OpenID登录。 OpenID的唯一登录会更简单。基本上,您只需要在客户端的例子。

You can do this via WebView inside a Dialog for a smooth user experience. See the LeanEngine open-source project for an example implementation: server and client. Server is a bit complicated as it supports both Facebook and OpenID login. OpenID only login would be simpler. You basically only need the client example.

不过,如果你并不需要的OpenID,并愿意限制你的用户在谷歌帐户,那么你可以使用的谷歌的ClientLogin API 。一个例如使用。

However, if you do not need OpenID and are willing to limit your users to Google Account, then you can use Google ClientLogin API. An example usage.