针对多种服务的Google ClientLogin授权

时间:2011-07-11 16:30:12

标签: google-authentication

发送到Google ClientLogin https://www.google.com/accounts/ClientLogin

的HTTPS请求中的

我发送一个名为“service”的https请求参数。这将是我需要通过身份验证的Google服务。

在我的应用程序中,我希望获得对“联系人”和“谷歌文档”服务的访问权限。我可以向ClientLogin发送两个“服务”参数请求吗?每项服务一个?这会有用还是有另一个更干净的解决方案?

1 个答案:

答案 0 :(得分:0)

According to a Google employee无法获得对多个服务有效的令牌:

A Client Login token only works for a single service, but you can 
request more than one token. For example one for Calendar (cl) and 
another for Contacts (cp) then you can use the appropriate token for 
the following services requests. 

我在文档中找不到任何关于只使用一个请求为不同服务获取多个令牌的内容,所以我认为最干净的方法可能就是执行2个请求并保留2个令牌。