Bug 1231642 - Log in to Mail.Ru (IMAP/SMTP) using OAuth, r=rkent, a=rkent
authorAlexander Abashkin <monolithed@gmail.com>
Mon, 14 Dec 2015 15:17:09 +0300
changeset 26677 51c54450105d3e2dcc5d6b7444d2550eed86e5a2
parent 26676 c3d53b5ddf1e3f6d714f79348ab503b9872e152b
child 26678 d667a01136d05994a0d04a3419859d1da4d91fc3
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrkent, rkent
bugs1231642
Bug 1231642 - Log in to Mail.Ru (IMAP/SMTP) using OAuth, r=rkent, a=rkent
mailnews/base/util/OAuth2Providers.jsm
--- a/mailnews/base/util/OAuth2Providers.jsm
+++ b/mailnews/base/util/OAuth2Providers.jsm
@@ -10,32 +10,41 @@ var EXPORTED_SYMBOLS = ["OAuth2Providers
 var {classes: Cc, interfaces: Ci, results: Cr, utils: Cu} = Components;
 
 // map of hostnames to [issuer, scope]
 var kHostnames = new Map([
   ["imap.googlemail.com", ["accounts.google.com", "https://mail.google.com/"]],
   ["smtp.googlemail.com", ["accounts.google.com", "https://mail.google.com/"]],
   ["imap.gmail.com", ["accounts.google.com", "https://mail.google.com/"]],
   ["smtp.gmail.com", ["accounts.google.com", "https://mail.google.com/"]],
+
+  ["imap.mail.ru", ["o2.mail.ru", "mail.imap"]],
+  ["smtp.mail.ru", ["o2.mail.ru", "mail.imap"]],
 ]);
 
 // map of issuers to appKey, appSecret, authURI, tokenURI
 
 // For the moment, these details are hard-coded, since Google does not
 // provide dynamic client registration. Don't copy these values for your
 // own application--register it yourself. This code (and possibly even the
 // registration itself) will disappear when this is switched to dynamic
 // client registration.
 var kIssuers = new Map ([
   ["accounts.google.com", [
     '406964657835-aq8lmia8j95dhl1a2bvharmfk3t1hgqj.apps.googleusercontent.com',
     'kSmqreRr0qwBWJgbf5Y-PjSU',
     'https://accounts.google.com/o/oauth2/auth',
     'https://www.googleapis.com/oauth2/v3/token'
   ]],
+  ["o2.mail.ru", [
+    'thunderbird',
+    'I0dCAXrcaNFujaaY',
+    'https://o2.mail.ru/login',
+    'https://o2.mail.ru/token'
+  ]],
 ]);
 
 /**
  *  OAuth2Providers: Methods to lookup OAuth2 parameters for supported
  *                   email providers.
  */
 var OAuth2Providers = {