21 lines
517 B
Python
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
|