Files
mail-intake/mail_intake/auth/base.py
2026-01-03 05:21:55 +05:30

21 lines
517 B
Python

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