Bug 1559972 - Add OAuth2.0 for Yandex. r=mkmelin DONTBUILD
authorDenis Kharybin <kharybin@yandex-team.ru>
Tue, 18 Jun 2019 19:20:15 +0300
changeset 35978 e73c4bbd0df78f8dfac0e803d32b25239c9e900d
parent 35977 8339093aab085fadc5e43c217ca301da737c9522
child 35979 717b8982038139edb46a103a43228934a5b92997
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersmkmelin
bugs1559972
Bug 1559972 - Add OAuth2.0 for Yandex. r=mkmelin DONTBUILD
mailnews/base/util/OAuth2Providers.jsm
--- a/mailnews/base/util/OAuth2Providers.jsm
+++ b/mailnews/base/util/OAuth2Providers.jsm
@@ -12,16 +12,19 @@ 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"]],
 
+  ["imap.yandex.com", ["oauth.yandex.com", "mail:imap_full"]],
+  ["smtp.yandex.com", ["oauth.yandex.com", "mail:smtp"]],
+
   ["imap.mail.yahoo.com", ["login.yahoo.com", "mail-w"]],
   ["smtp.mail.yahoo.com", ["login.yahoo.com", "mail-w"]],
 
   ["imap.aol.com", ["login.aol.com", "mail-w"]],
   ["smtp.aol.com", ["login.aol.com", "mail-w"]],
 ]);
 
 // map of issuers to appKey, appSecret, authURI, tokenURI
@@ -39,16 +42,22 @@ var kIssuers = new Map([
     "https://www.googleapis.com/oauth2/v3/token",
   ]],
   ["o2.mail.ru", [
     "thunderbird",
     "I0dCAXrcaNFujaaY",
     "https://o2.mail.ru/login",
     "https://o2.mail.ru/token",
   ]],
+  ["oauth.yandex.com", [
+    "2a00bba7374047a6ab79666485ffce31",
+    "3ded85b4ec574c2187a55dc49d361280",
+    "https://oauth.yandex.com/authorize",
+    "https://oauth.yandex.com/token",
+  ]],
   ["login.yahoo.com", [
     "dj0yJmk9NUtCTWFMNVpTaVJmJmQ9WVdrOVJ6UjVTa2xJTXpRbWNHbzlNQS0tJnM9Y29uc3VtZXJzZWNyZXQmeD0yYw--",
     "f2de6a30ae123cdbc258c15e0812799010d589cc",
     "https://api.login.yahoo.com/oauth2/request_auth",
     "https://api.login.yahoo.com/oauth2/get_token",
   ]],
   ["login.aol.com", [
     "dj0yJmk9OXRHc1FqZHRQYzVvJmQ9WVdrOU1UQnJOR0pvTjJrbWNHbzlNQS0tJnM9Y29uc3VtZXJzZWNyZXQmeD02NQ--",