为访问 Google 文档的用户提供 Google 帐户授权
我正在通过 google docs API 提取 Coldfusion 中的文档列表。我希望用户点击链接并使用我的用户名和密码在谷歌文档中自动登录。 Google 不应询问他们的用户名和密码。 我尝试了这个例子 http://cfgoogle.riaforge.org/
直到现在我能够拉起我的谷歌文档帐户上的文档列表。 但我希望任何人单击这些链接并自动以我的身份登录。并能够访问我的文档。是否可以?
I am pulling list of docs in coldfusion via google docs API. I want users to click on the link and get signed in automatically in google docs, with my username and password. Google should not ask user name and password from them.
I tried out this example http://cfgoogle.riaforge.org/
Till now I am able to pull up list of documents I have on my google docs account.
But I want anyone to click those link and get automatically signed in as me. And able to access my documents. Is it possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我猜想通过最终用户的浏览器访问文档是不可能的。 Google 将在您的计算机上设置一个 cookie 来识别您的会话。这使您可以访问您帐户中链接的文档、邮件等。为了使他们能够使用您的帐户访问文档,他们必须以您的身份登录。您不能直接从您的应用程序执行此操作,因为您只能为您的域编写 cookie(过于简单化,但基本上......)
但是,可能有一种解决方法。
一种选择是使用 API 自动与用户共享文档。也就是说,他们提供他们的 Google ID(不是密码),然后您与他们的帐户共享。这可能就是我会尝试的。
或者,您可以代理对文档的请求,尽管这会带来另一堆蠕虫病毒。
I would guess that accessing the documents as you is not possible via the end-user's browser. Google will set a cookie on your computer identifying your session. This allows you access to documents, mail, etc. whatever is linked in your account. For them to be able to access the documents using your account, they would have to be logged in as you. You can't do that directly from your application, because you can only write cookies for your domain (oversimplification, but basically....)
There may, however, be a workaround.
One option would be to use the API to automatically share the document with the user. That is, they provide their Google ID (not password) and you share with their account. This is probably what I would try.
Alternately, you could proxy requests for documents, although this opens up a whole 'nother can of worms.