aboutsummaryrefslogtreecommitdiffstats
path: root/cloud_mdir_sync/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloud_mdir_sync/config.py')
-rw-r--r--cloud_mdir_sync/config.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/cloud_mdir_sync/config.py b/cloud_mdir_sync/config.py
index 79ab4a9..019e757 100644
--- a/cloud_mdir_sync/config.py
+++ b/cloud_mdir_sync/config.py
@@ -116,9 +116,18 @@ class Config(object):
self.local_mboxes.append(MailDirMailbox(self, directory))
return self.local_mboxes[-1]
- def CredentialServer(self, path: str, accounts: List, umask=0o600):
+ def CredentialServer(self,
+ path: str,
+ accounts: List,
+ umask=0o600,
+ protocols=["SMTP"]):
+ """Serve XOAUTH2 bearer tokens over a unix domain socket. The client
+ writes the user to obtain a token for and the server responds with the
+ token. protocols can be IMAP or SMTP. The cms-oauth program interacts
+ with this server."""
from .credsrv import CredentialServer
- self.async_tasks.append(CredentialServer(self, path, accounts, umask))
+ self.async_tasks.append(
+ CredentialServer(self, path, accounts, umask, protocols))
return self.async_tasks[-1]
def _direct_message(self, msg):