aboutsummaryrefslogtreecommitdiffstats
path: root/cloud_mdir_sync/oauth.py
Commit message (Collapse)AuthorAgeFilesLines
* oauth: Extract the web server address from the setup URLJason Gunthorpe2020-07-281-1/+4
| | | | | | This lets the OAUTH module be used for other localhost ports too. Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
* OAUTH: Add support to get an IMAP OAUTH tokenJason Gunthorpe2020-06-221-4/+3
| | | | | | | Latest mutt can do this for MS and GMail providers, provide support for getting the right scope and some examples how to set it up. Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
* OAUTH: Only start one webbrowser tab for concurrent authenticationsJason Gunthorpe2020-06-221-0/+14
| | | | | | | | Starting a browser tab per authentication attempt makes a mess, so long as there is something in auth_redirs then the active browser tab will eventually get redirected to the new auth being added. Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
* GMail: Stop using requests-oauth and just invoke the POSTs directlyJason Gunthorpe2020-06-221-8/+124
| | | | | | | aio-http is much better, requests seems to get stuck occasionaly. This allows all GMail accounts to acquire access tokens concurrently. Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
* Add OAUTH Credential serverJason Gunthorpe2020-05-281-0/+25
| | | | | | | | | | | | | | | | The OAUTH credential server allows CMS to ack as an OAUTH broker and supply bearer tokens to other applications in the system. Currently this only support SMTP tokens for outbound mail delivery. A UNIX domain socket is used to communicate between the SMTP agent and CMS. A simple one line protocol is used to specify the account requested and CMS returns the plain XAOUTH2 response string. The agent is responsible to base64 encode it. This works for GMail and O365 mailboxes. Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
* GMail supportJason Gunthorpe2020-02-061-9/+17
| | | | | | Basic support for GMail using the REST API Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
* Initial commit of cloud_mdir_syncJason Gunthorpe2020-01-101-0/+60
I have been using for a few months now with no ill effects. Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>