Google 帐户所需的同步功能
我正在查看 JumpNotes 的代码,但有一件事我无法弄清楚。 JumpNotes:AccountList.java
public static final String[] GOOGLE_ACCOUNT_REQUIRED_SYNCABILITY_FEATURES =
new String[]{ "service_ah" };
这用于获取谷歌帐户,如下所示:
mAccountManager.getAccountsByTypeAndFeatures(SyncAdapter.GOOGLE_ACCOUNT_TYPE,
SyncAdapter.GOOGLE_ACCOUNT_REQUIRED_SYNCABILITY_FEATURES,
这个功能“service_ah”是什么?这是什么意思? 有什么方法可以获取 Android 上 google 帐户的身份验证器服务的源代码吗?
I was looking at the code for JumpNotes and there was one thing I just could not figure out.
JumpNotes: AccountList.java
public static final String[] GOOGLE_ACCOUNT_REQUIRED_SYNCABILITY_FEATURES =
new String[]{ "service_ah" };
This is used to get google accounts like so:
mAccountManager.getAccountsByTypeAndFeatures(SyncAdapter.GOOGLE_ACCOUNT_TYPE,
SyncAdapter.GOOGLE_ACCOUNT_REQUIRED_SYNCABILITY_FEATURES,
What is this feature "service_ah"? What does it mean?
Is there any way I can get the source for the authenticator service for google accounts on Android?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
来自 Android 文档:
我没有找到任何官方文档,但似乎每个功能都是 service_code 形式,其中代码代表 Google 服务。
从这个(过时的)服务列表中,“ah”显然代表“ Google Mashups 编辑器和 Google App Engine”
From Android Documentation:
I didn't found any official documentation, but it seems that each feature is of the form service_code where code stands for a Google service.
From this (outdated) list of services, "ah" stands apparently for "Google Mashups Editor & Google App Engine"
这个 python Google 帐户身份验证示例并没有多大帮助对于您来说,但我们可以了解以下两件事:
首先,Google 帐户上的连接由 GAE 分两步处理。
>这需要两次调用,一次调用 Google 帐户的 ClientLogin 服务,
然后第二个到 App Engine 的登录前端。
其次,我们可以在第 101 行找到令牌“_ah”,这意味着在这种情况下,我们会启用 cookie,以便下次他想要时使用该服务进行自动身份验证auth(用户数据存储到 cookie 中以跳过第一个 auth 调用)。
因此,在您的情况下,“service_ah”意味着您希望用户进行一次身份验证,然后身份验证过程应由 AccountManager 自动处理。
This python Google account authentication example is not really helpful for you,but we can learn two things as below:
First, the connection on a google account is handled by GAE in two steps.
> This takes two calls, one to the ClientLogin service of Google Accounts,
and then a second to the login frontend of App Engine.
Second, We can find on line 101 the token "_ah", which means in this case that we enable cookies for automatic auth with the service next time he wants to auth (user data are stored into cookies to skip the first auth call).
So in your case "service_ah" means that you want the user to authenticate one time and then the authentication process should be automatically handled by the AccountManager.