I want to access gmail IMAP using XOAUTH with PHP. http://code.google.com/intl/uk/apis/gmail/oauth/protocol.html#imap
I tried samples from page above and i can get get token for AUTHENTICATE XOAUTH . But i don't know how to include this token in IMAP requests. I use http://php.net/manual/en/book.imap.php library to access IMAP. Seems this PHP extension doesn't allow to use some alternate AUTHENTICATE methods. Is this possible to use XOAUTH with this IMAP extension?
If no then what can i do there? Is it possible to create some alternate function for imap_open that will return some handle taht later can be used with all another functions of this extension?