如何使用 OAuth2.0 生成 XOAUTH 参数以与 Gmail IMAP 协议一起使用?
我有一个用户被授权可以使用 OAuth2.0 通过 imap 访问他们的 Gmail。我有 OAuth2.0 访问令牌(和刷新令牌)。但我无法弄清楚如何将其映射到 XOAUTH 参数。所有生成 XOAUTH 参数的文档都是假设 OAuth1.0 编写的。
我可以按照示例代码使其与 OAuth1.0 一起工作。但我的服务器正在使用 OAuth2.0 来做其他事情,我想使用相同的代码。
I have a user authorized to access their gmail through imap using OAuth2.0. I have the OAuth2.0 access token (and refresh token). But I am having trouble figuring out how to map that into an XOAUTH parameter. All the documentation for generating the XOAUTH parameter are written assuming OAuth1.0.
I can follow the sample code make this work with OAuth1.0. But my server is using OAuth2.0 for other things and I want to use the same code.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从我的谷歌搜索来看,我认为目前不可能使用 OAuth2 访问令牌为 IMAP 构造 XOAUTH 参数。这是谷歌真正需要尽快添加的东西。
请参阅 http://groups.google.com/group/ oauth2-dev/browse_thread/thread/c1235d5f21e7b438?pli=1
From my Googling, I don't think it's currently possible to construct an XOAUTH param for IMAP using the OAuth2 access token. This is something Google really needs to add ASAP.
See http://groups.google.com/group/oauth2-dev/browse_thread/thread/c1235d5f21e7b438?pli=1