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.