dify/api/libs
-LAN- 69f712b713 feat: Add SMTP OAuth 2.0 support for Microsoft Exchange
Add comprehensive OAuth 2.0 authentication support for SMTP to address
Microsoft's Basic Authentication retirement in September 2025.

Key features:
- OAuth 2.0 SASL XOAUTH2 authentication mechanism
- Microsoft Azure AD integration with client credentials flow
- Backward compatible with existing basic authentication
- Comprehensive configuration options in .env.example files
- Enhanced SMTP client with dependency injection for better testability
- Complete test coverage with proper mocking

Configuration:
- SMTP_AUTH_TYPE: Choose between 'basic' and 'oauth2' authentication
- Microsoft OAuth 2.0 settings for Azure AD integration
- Automatic token acquisition using client credentials flow

Files changed:
- Enhanced SMTP client with OAuth 2.0 support
- New mail module structure under libs/mail/
- Updated configuration system with OAuth settings
- Comprehensive documentation and setup instructions
- Complete test suite for OAuth functionality

This change ensures compatibility with Microsoft Exchange Online
after Basic Authentication retirement.
2025-09-23 01:30:06 +08:00
..
mail feat: Add SMTP OAuth 2.0 support for Microsoft Exchange 2025-09-23 01:30:06 +08:00
__init__.py chore: apply ruff rules on tests and app.py (#3605) 2024-04-18 20:24:05 +08:00
datetime_utils.py feat: Persist Variables for Enhanced Debugging Workflow (#20699) 2025-06-24 09:05:29 +08:00
email_i18n.py chore: add ast-grep rule to convert Optional[T] to T | None (#25560) 2025-09-15 13:06:33 +08:00
exception.py chore: add ast-grep rule to convert Optional[T] to T | None (#25560) 2025-09-15 13:06:33 +08:00
external_api.py Fix basedpyright type errors (#25435) 2025-09-10 01:54:26 +08:00
file_utils.py refactor: define the Dify project version in pyproject.toml (#20910) 2025-07-01 12:07:24 +08:00
flask_utils.py feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
gmpy2_pkcs10aep_cipher.py chore: apply ty checks on api code with script and ci action (#24653) 2025-09-02 16:05:13 +08:00
helper.py chore: add ast-grep rule to convert Optional[T] to T | None (#25560) 2025-09-15 13:06:33 +08:00
infinite_scroll_pagination.py chore(api/libs): Apply ruff format. (#7301) 2024-08-15 17:53:12 +08:00
json_in_md_parser.py remove bare list, dict, Sequence, None, Any (#25058) 2025-09-06 03:32:23 +08:00
login.py add more typing (#24949) 2025-09-08 10:40:00 +08:00
module_loading.py remove bare list, dict, Sequence, None, Any (#25058) 2025-09-06 03:32:23 +08:00
oauth.py more httpx (#25651) 2025-09-22 23:07:09 +08:00
oauth_data_source.py more httpx (#25651) 2025-09-22 23:07:09 +08:00
orjson.py chore: add ast-grep rule to convert Optional[T] to T | None (#25560) 2025-09-15 13:06:33 +08:00
passport.py chore: apply ty checks on api code with script and ci action (#24653) 2025-09-02 16:05:13 +08:00
password.py Feat/new login (#8120) 2024-10-21 10:03:40 +08:00
rsa.py fix: resolve Windows path separator issue in Huawei OBS operations (#23475) 2025-08-07 21:17:46 +08:00
sendgrid.py [Chore/Refactor] Switch from MyPy to Basedpyright for type checking (#25047) 2025-09-03 11:52:26 +08:00
typing.py feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
uuid_utils.py feat(api): add UUIDv7 implementation in SQL and Python (#22058) 2025-07-16 13:07:08 +08:00