Bug 1176773 - Support imap.gmail.com and smtp.gmail.com urls in OAuth2. r=mkmelin
authorR Kent James <rkent@caspia.com>
Mon, 22 Jun 2015 18:09:00 +0300
changeset 22812 23d2b24151c443a7a2a5e5fd28c47da06cf8069b
parent 22811 02713c0869c2e9704a038f3d4068e9dba5b3e519
child 22813 a88a7d21371a6ea937b76bedea68313b462900c4
push id1443
push usermbanner@mozilla.com
push dateMon, 10 Aug 2015 18:31:17 +0000
treeherdercomm-beta@8fe07d686c22 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin
bugs1176773
Bug 1176773 - Support imap.gmail.com and smtp.gmail.com urls in OAuth2. r=mkmelin
mailnews/base/util/OAuth2Providers.jsm
--- a/mailnews/base/util/OAuth2Providers.jsm
+++ b/mailnews/base/util/OAuth2Providers.jsm
@@ -8,16 +8,18 @@
 var EXPORTED_SYMBOLS = ["OAuth2Providers"];
 
 const {classes: Cc, interfaces: Ci, results: Cr, utils: Cu} = Components;
 
 // map of hostnames to [issuer, scope]
 const kHostnames = new Map([
   ["imap.googlemail.com", ["accounts.google.com", "http://mail.google.com/"]],
   ["smtp.googlemail.com", ["accounts.google.com", "http://mail.google.com/"]],
+  ["imap.gmail.com", ["accounts.google.com", "http://mail.google.com/"]],
+  ["smtp.gmail.com", ["accounts.google.com", "http://mail.google.com/"]],
 ]);
 
 // 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