简体   繁体   English

如何使用OAuth2.0生成XOAUTH参数以用于Gmail IMAP协议?

[英]How to generate an XOAUTH parameter using OAuth2.0 for use with Gmail IMAP protocol?

I have a user authorized to access their gmail through imap using OAuth2.0. 我有一个用户有权使用OAuth2.0通过imap访问他们的Gmail。 I have the OAuth2.0 access token (and refresh token). 我有OAuth2.0访问令牌(和刷新令牌)。 But I am having trouble figuring out how to map that into an XOAUTH parameter. 但我无法弄清楚如何将其映射到XOAUTH参数。 All the documentation for generating the XOAUTH parameter are written assuming OAuth1.0. 生成XOAUTH参数的所有文档都是在假定OAuth1.0的情况下编写的。

I can follow the sample code make this work with OAuth1.0. 我可以按照示例代码使用OAuth1.0。 But my server is using OAuth2.0 for other things and I want to use the same code. 但我的服务器使用OAuth2.0进行其他操作,我想使用相同的代码。

From my Googling, I don't think it's currently possible to construct an XOAUTH param for IMAP using the OAuth2 access token. 从我的谷歌搜索,我认为目前不可能使用OAuth2访问令牌为IMAP构建XOAUTH参数。 This is something Google really needs to add ASAP. 这是Google真正需要尽快添加的内容。

See http://groups.google.com/group/oauth2-dev/browse_thread/thread/c1235d5f21e7b438?pli=1 请参阅http://groups.google.com/group/oauth2-dev/browse_thread/thread/c1235d5f21e7b438?pli=1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM