diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2020-06-19 14:10:28 -0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2020-06-22 20:24:18 -0300 |
commit | c607f4a3cbd9cc4c9611db12bfe175b52de514e1 (patch) | |
tree | 7d9772b095b956137cab0f17c8941fff2b33b08c /cloud_mdir_sync/oauth.py | |
parent | 6c7dbe902d8679570ca10f39672d844fa5cb6c50 (diff) | |
download | cloud_mdir_sync-c607f4a3cbd9cc4c9611db12bfe175b52de514e1.tar.gz cloud_mdir_sync-c607f4a3cbd9cc4c9611db12bfe175b52de514e1.tar.bz2 cloud_mdir_sync-c607f4a3cbd9cc4c9611db12bfe175b52de514e1.zip |
OAUTH: Add support to get an IMAP OAUTH token
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>
Diffstat (limited to 'cloud_mdir_sync/oauth.py')
-rw-r--r-- | cloud_mdir_sync/oauth.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cloud_mdir_sync/oauth.py b/cloud_mdir_sync/oauth.py index 716e7c0..385e0e8 100644 --- a/cloud_mdir_sync/oauth.py +++ b/cloud_mdir_sync/oauth.py @@ -19,16 +19,15 @@ if TYPE_CHECKING: class Account(object): """An OAUTH2 account""" - oauth_smtp = False def __init__(self, cfg: "config.Config", user: str): self.cfg = cfg self.user = user + self.protocols = set() @abstractmethod - async def get_xoauth2_bytes(self, proto: str) -> bytes: - pass - + async def get_xoauth2_bytes(self, proto: str) -> Optional[bytes]: + return None class WebServer(object): """A small web server is used to manage oauth requests. The user should point a browser |