My php application logs into to gmail via oauth provided keys and fetch headers for all messages in inbox. The current 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 know how oauth works for google and have written it with php earlier. I need to figure out how to make that change inside the extension code itself and compile it.
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 5 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.