This commit is contained in:
2026-01-03 05:21:55 +05:30
parent 278f0a3d40
commit 412a9c7bec
22 changed files with 950 additions and 0 deletions

20
mail_intake/auth/base.py Normal file
View File

@@ -0,0 +1,20 @@
from abc import ABC, abstractmethod
class MailIntakeAuthProvider(ABC):
"""
Abstract authentication provider.
Mail adapters depend on this interface, not on concrete
OAuth or credential implementations.
"""
@abstractmethod
def get_credentials(self):
"""
Return provider-specific credentials object.
This method is synchronous by design and must either
return valid credentials or raise MailIntakeAuthError.
"""
raise NotImplementedError