我可以使用Android的的AccountManager获取OAuth访问令牌的应用引擎? [英] Can I use Android's AccountManager for getting OAuth access token for AppEngine?

查看:195
本文介绍了我可以使用Android的的AccountManager获取OAuth访问令牌的应用引擎?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有Android客户端我的AppEngine上的服务器,都使用谷歌帐户。我想用的AccountManager获取的 accessToken 的对OAuth的。到目前为止,我使用的ClientLogin,但我想切换到OAuth的。

I have Android client to my AppEngine server, both using Google Accounts. I would like to use AccountManager for getting accessToken for OAuth. So far I'm using ClientLogin, but I would like to switch to OAuth.

设置OAuth的上AppEngine上很容易 - 我跟着的这篇文章。但是,客户端是一个谜,尤其是我不知道是干什么用的范围,术语的AccountManager的 authTokenType 的。对于ClientLogin的,我用啊了的 authTokenType 的。但是,我们的OAuth?

Setting up OAuth on AppEngine is easy - I followed this article. But the client side is a mystery, in particular I don't know what to use for scope, in AccountManager terms authTokenType. For ClientLogin, I'm using "ah" for authTokenType. But what about OAuth?

推荐答案

截至今天,你可以使用谷歌播放服务API在Android上做机器人的Oauth 2.0认证。然后,您可以使用由@nivco描述的方法来获得对应用程序引擎的用户信息。我没有这样做,但我打算TP做的正是你在说什么。

As of today you can use Google Play Services API on android to do Oauth 2.0 authentication on android. You could then use the method described by @nivco to get the userinfo on appengine. I have not done this yet, but I plan tp do exactly what your talking about.

<一个href="https://developers.google.com/android/google-play-services/authentication">https://developers.google.com/android/google-play-services/authentication

这篇关于我可以使用Android的的AccountManager获取OAuth访问令牌的应用引擎?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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