My php application logs into to Gmail via oauth provided access keys and fetch headers for all messages in inbox. The php-imap extension allows only for login/password based authentication. I want to modify the extension so that it support oauth based authentication too. I need to figure out how to make that change inside the extension code itself and compile it. Bad part, I do not have much clue where to make changes and how to compile a php extension
Earlier I was using the Zend provided IMAP classes for this task. They are very slow and gmail tends to disconnect the connection if it takes more than 40-45 minutes or so. For very large inboxes this was happening frequently. I tested this with php-imap extension and it worked almost 10 times faster that the zend one (i guess since its written in C)
So I need to figure out how and where authentication is taking place in the current php-imap code and how do i re-compile it after making the changes.
Any pointers are appreciated.