# HG changeset patch # User Magnus Melin # Date 1587403689 -10800 # Node ID 6e1d49280545bb8996902c188e4823e738e83b7c # Parent 925c5099af1595958a6e6825e495cc898eb2d15b Bug 1528136 - add details to enable OAuth2 for Office 365. r=aleca diff --git a/mailnews/base/util/OAuth2Providers.jsm b/mailnews/base/util/OAuth2Providers.jsm --- a/mailnews/base/util/OAuth2Providers.jsm +++ b/mailnews/base/util/OAuth2Providers.jsm @@ -26,16 +26,31 @@ var kHostnames = new Map([ ["imap.mail.yahoo.com", ["login.yahoo.com", "mail-w"]], ["pop.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"]], ["pop.aol.com", ["login.aol.com", "mail-w"]], ["smtp.aol.com", ["login.aol.com", "mail-w"]], + + [ + "outlook.office365.com", + [ + "login.microsoftonline.com", + "https://outlook.office365.com/IMAP.AccessAsUser.All https://outlook.office365.com/POP.AccessAsUser.All https://outlook.office365.com/SMTP.Send offline_access", + ], + ], + [ + "smtp.office365.com", + [ + "login.microsoftonline.com", + "https://outlook.office365.com/IMAP.AccessAsUser.All https://outlook.office365.com/POP.AccessAsUser.All https://outlook.office365.com/SMTP.Send offline_access", + ], + ], ]); /** * Map of issuers to clientId, clientSecret, authorizationEndpoint, tokenEndpoint. * Issuer is a unique string for the organization that a Thunderbird account * was registered at. * * For the moment these details are hard-coded, since dynamic client @@ -70,16 +85,27 @@ var kIssuers = new Map ([ 'https://api.login.yahoo.com/oauth2/get_token' ]], ["login.aol.com", [ 'dj0yJmk9OXRHc1FqZHRQYzVvJmQ9WVdrOU1UQnJOR0pvTjJrbWNHbzlNQS0tJnM9Y29uc3VtZXJzZWNyZXQmeD02NQ--', '79c1c11991d148ddd02a919000d69879942fc278', 'https://api.login.aol.com/oauth2/request_auth', 'https://api.login.aol.com/oauth2/get_token' ]], + + [ + "login.microsoftonline.com", + [ + "08162f7c-0fd2-4200-a84a-f25a4db0b584", // Application (client) ID + "TxRBilcHdC6WGBee]fs?QR:SJ8nI[g82", // @see App registrations | Certificates & secrets + // https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-protocols#endpoints + "https://login.microsoftonline.com/common/oauth2/v2.0/authorize", + "https://login.microsoftonline.com/common/oauth2/v2.0/token", + ], + ], ]); /** * OAuth2Providers: Methods to lookup OAuth2 parameters for supported OAuth2 * providers. */ var OAuth2Providers = { /**