mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-26 02:17: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
|
|
@ -28,10 +28,12 @@ function createAccountInBackend(config)
|
|||
if (config.rememberPassword && config.incoming.password.length)
|
||||
rememberPassword(inServer, config.incoming.password);
|
||||
|
||||
#ifdef MOZ_MAILNEWS_OAUTH2
|
||||
if (inServer.authMethod == Ci.nsMsgAuthMethod.OAuth2) {
|
||||
inServer.setCharValue("oauth2.scope", config.oauthSettings.scope);
|
||||
inServer.setCharValue("oauth2.issuer", config.oauthSettings.issuer);
|
||||
}
|
||||
#endif
|
||||
|
||||
// SSL
|
||||
if (config.incoming.socketType == 1) // plain
|
||||
|
|
@ -107,6 +109,7 @@ function createAccountInBackend(config)
|
|||
rememberPassword(outServer, config.incoming.password);
|
||||
}
|
||||
|
||||
#ifdef MOZ_MAILNEWS_OAUTH2
|
||||
if (outServer.authMethod == Ci.nsMsgAuthMethod.OAuth2) {
|
||||
let pref = "mail.smtpserver." + outServer.key + ".";
|
||||
Services.prefs.setCharPref(pref + "oauth2.scope",
|
||||
|
|
@ -114,6 +117,7 @@ function createAccountInBackend(config)
|
|||
Services.prefs.setCharPref(pref + "oauth2.issuer",
|
||||
config.oauthSettings.issuer);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (config.outgoing.socketType == 1) // no SSL
|
||||
outServer.socketType = Ci.nsMsgSocketType.plain;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue