mustang-im / mustang

Mustang - New full-featured desktop email, chat and video conference client
https://mustang.im
Other
5 stars 0 forks source link

Protocol: Mail: OWA #55

Open benbucksch opened 3 months ago

benbucksch commented 3 months ago

Implement Outlook Web Access wire protocol for Microsoft Exchange on-premise and Office365

Including authentication using the web form and password fill, with simple password form, lax password form, and interactive webpage.

benbucksch commented 3 months ago

@NeilRashbrook Please add all the code to the stub classes in app/logic/Mail/OWA/ that I already created for you.

See fetchConfig.ts fetchText() and npm ky for how to make HTTP requests to any hosts from the app/logic/Mail/ code in frontend. This kyCreate is still a work in progress.

benbucksch commented 3 months ago

We don't need to support Exchange 2013 anymore. See https://github.com/mustang-im/mustang/issues/56#issuecomment-2024848310

benbucksch commented 3 weeks ago

Login can happen via the OAuth2UIDialog or OAuth2UITab classes. They're for OAuth2, but should mostly do what you need. They will open <webview partition="persist:<accountname>">, so the cookies will be saved, in a separate cookie jar per account.

To use these cookies, we can use the Electron main window feature session.fromPartition("persist:<accountname>") and session.fetch() (which uses session.cookies from that cookie jar above). The API for session.fetch() seems to be the same as for the web fetch() function.

References: