mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-27 10:57:34 +09:00
Issue #1258 - Part 8: Ifdef MailNews OAuth2 Support
Use --disable-mailnews-oauth2 to exclude it. Confvars won't be respected.
This commit is contained in:
parent
971009881c
commit
1531d6498d
27 changed files with 193 additions and 23 deletions
|
|
@ -30,7 +30,9 @@
|
|||
*/
|
||||
|
||||
Components.utils.import("resource:///modules/mailServices.js");
|
||||
#ifdef MOZ_MAILNEWS_OAUTH2
|
||||
Components.utils.import("resource://gre/modules/OAuth2Providers.jsm");
|
||||
#endif
|
||||
|
||||
if (typeof gEmailWizardLogger == "undefined") {
|
||||
Cu.import("resource:///modules/gloda/log4moz.js");
|
||||
|
|
@ -74,6 +76,7 @@ function verifyConfig(config, alter, msgWindow, successCallback, errorCallback)
|
|||
config.incoming.auth);
|
||||
inServer.authMethod = config.incoming.auth;
|
||||
|
||||
#ifdef MOZ_MAILNEWS_OAUTH2
|
||||
try {
|
||||
// Lookup issuer if needed.
|
||||
if (config.incoming.auth == Ci.nsMsgAuthMethod.OAuth2 ||
|
||||
|
|
@ -100,6 +103,9 @@ function verifyConfig(config, alter, msgWindow, successCallback, errorCallback)
|
|||
|
||||
if (inServer.password ||
|
||||
inServer.authMethod == Ci.nsMsgAuthMethod.OAuth2)
|
||||
#else
|
||||
if (inServer.password)
|
||||
#endif
|
||||
verifyLogon(config, inServer, alter, msgWindow,
|
||||
successCallback, errorCallback);
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue