mirror of
https://github.com/moparisthebest/mail
synced 2024-12-21 23:08:50 -05:00
Use only mail-config service for imap/smtp config
* remove 'pinned' attribute from imap/smtp config * remove 'provider' attribute from auth module * add 'oauthDomains' to app-config * remove all static server config from the app-config
This commit is contained in:
parent
11d7a26c31
commit
510f147b97
@ -19,6 +19,8 @@
|
||||
|
||||
"predef": [
|
||||
"$",
|
||||
"inject",
|
||||
"Promise",
|
||||
"self",
|
||||
"importScripts",
|
||||
"console",
|
||||
|
@ -192,6 +192,7 @@ module.exports = function(grunt) {
|
||||
'test/unit/invitation-dao-test.js',
|
||||
'test/unit/update-handler-test.js',
|
||||
'test/unit/connection-doctor-test.js',
|
||||
'test/unit/mail-config-service-test.js',
|
||||
'test/main.js'
|
||||
]
|
||||
},
|
||||
|
@ -9,141 +9,13 @@ exports.config = {
|
||||
adminUrl: 'https://admin-node.whiteout.io',
|
||||
settingsUrl: 'https://settings.whiteout.io/autodiscovery/',
|
||||
wmailDomain: 'wmail.io',
|
||||
oauthDomains: [/\.gmail\.com$/, /\.googlemail\.com$/],
|
||||
serverPrivateKeyId: 'EE342F0DDBB0F3BE',
|
||||
symKeySize: 256,
|
||||
symIvSize: 96,
|
||||
asymKeySize: 2048,
|
||||
workerPath: 'js',
|
||||
reconnectInterval: 10000,
|
||||
wmail: {
|
||||
imap: {
|
||||
host: 'imap.wmail.io',
|
||||
port: 993,
|
||||
secure: true,
|
||||
ca: '-----BEGIN CERTIFICATE-----\r\nMIIGiTCCBXGgAwIBAgIDAn03MA0GCSqGSIb3DQEBBQUAMIGMMQswCQYDVQQGEwJJ\r\nTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0\r\nYWwgQ2VydGlmaWNhdGUgU2lnbmluZzE4MDYGA1UEAxMvU3RhcnRDb20gQ2xhc3Mg\r\nMiBQcmltYXJ5IEludGVybWVkaWF0ZSBTZXJ2ZXIgQ0EwHhcNMTQwOTIxMTQ0ODQ0\r\nWh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Ib3DQEBBQUAA4IBAQDEDbCBvdfs/lEsEJk0xGB6OghO\r\ngUAHplmWJEXoHb0h7p2QAIcs/QKorMDi35bu/J2vbVRIP7i5wBTZLIHBaf03mqAR\r\nZxYFy/ymyROVmmKl1x1/ry1aumomfU86UN8hCkvJc+40V2KC1lCZcjqPWufECjpo\r\n37QXFA+te/rVyVgvoMhIq+zOBZEK0/2mYGCwlpEQo3HElCQIwV9upChOHnQ2jZyF\r\nCmoUyv0JNr8dkh6H7+KTV6FzWaC+b6Liier9bpfEq/zDAp41GR+L/pdbaliSDtRg\r\nfPhAyCZqwsXid6HgIyTBqxUpGDGRiuygqghmqlFfppZuAqz02wrNceDHH7Up\r\n-----END CERTIFICATE-----\r\n',
|
||||
pinned: true,
|
||||
ignoreTLS: false
|
||||
}
|
||||
},
|
||||
gmail: {
|
||||
clientId: '440907777130.apps.googleusercontent.com',
|
||||
imap: {
|
||||
host: 'imap.gmail.com',
|
||||
port: 993,
|
||||
secure: true,
|
||||
ca: '-----BEGIN CERTIFICATE-----\r\nMIIEBDCCAuygAwIBAgIDAjppMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT\r\nMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i\r\nYWwgQ0EwHhcNMTMwNDA1MTUxNTU1WhcNMTUwNDA0MTUxNTU1WjBJMQswCQYDVQQG\r\nEwJVUzETMBEGA1UEChMKR29vZ2xlIEluYzElMCMGA1UEAxMcR29vZ2xlIEludGVy\r\nbmV0IEF1dGhvcml0eSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB\r\nAJwqBHdc2FCROgajguDYUEi8iT/xGXAaiEZ+4I/F8YnOIe5a/mENtzJEiaB0C1NP\r\nVaTOgmKV7utZX8bhBYASxF6UP7xbSDj0U/ck5vuR6RXEz/RTDfRK/J9U3n2+oGtv\r\nh8DQUB8oMANA2ghzUWx//zo8pzcGjr1LEQTrfSTe5vn8MXH7lNVg8y5Kr0LSy+rE\r\nahqyzFPdFUuLH8gZYR/Nnag+YyuENWllhMgZxUYi+FOVvuOAShDGKuy6lyARxzmZ\r\nEASg8GF6lSWMTlJ14rbtCMoU/M4iarNOz0YDl5cDfsCx3nuvRTPPuj5xt970JSXC\r\nDTWJnZ37DhF5iR43xa+OcmkCAwEAAaOB+zCB+DAfBgNVHSMEGDAWgBTAephojYn7\r\nqwVkDBF9qn1luMrMTjAdBgNVHQ4EFgQUSt0GFhu89mi1dvWBtrtiGrpagS8wEgYD\r\nVR0TAQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8EBAMCAQYwOgYDVR0fBDMwMTAvoC2g\r\nK4YpaHR0cDovL2NybC5nZW90cnVzdC5jb20vY3Jscy9ndGdsb2JhbC5jcmwwPQYI\r\nKwYBBQUHAQEEMTAvMC0GCCsGAQUFBzABhiFodHRwOi8vZ3RnbG9iYWwtb2NzcC5n\r\nZW90cnVzdC5jb20wFwYDVR0gBBAwDjAMBgorBgEEAdZ5AgUBMA0GCSqGSIb3DQEB\r\nBQUAA4IBAQA21waAESetKhSbOHezI6B1WLuxfoNCunLaHtiONgaX4PCVOzf9G0JY\r\n/iLIa704XtE7JW4S615ndkZAkNoUyHgN7ZVm2o6Gb4ChulYylYbc3GrKBIxbf/a/\r\nzG+FA1jDaFETzf3I93k9mTXwVqO94FntT0QJo544evZG0R0SnU++0ED8Vf4GXjza\r\nHFa9llF7b1cq26KqltyMdMKVvvBulRP/F/A8rLIQjcxz++iPAsbw+zOzlTvjwsto\r\nWHPbqCRiOwY1nQ2pM714A5AuTHhdUDqB1O6gyHA43LL5Z/qHQF1hwFGPa4NrzQU6\r\nyuGnBXj8ytqU0CwIPX4WecigUCAkVDNx\r\n-----END CERTIFICATE-----',
|
||||
pinned: true,
|
||||
ignoreTLS: false
|
||||
},
|
||||
smtp: {
|
||||
host: 'smtp.gmail.com',
|
||||
port: 465,
|
||||
secure: true,
|
||||
ca: '-----BEGIN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gorBgEEAdZ5AgUBMA0GCSqGSIb3DQEB\r\nBQUAA4IBAQA21waAESetKhSbOHezI6B1WLuxfoNCunLaHtiONgaX4PCVOzf9G0JY\r\n/iLIa704XtE7JW4S615ndkZAkNoUyHgN7ZVm2o6Gb4ChulYylYbc3GrKBIxbf/a/\r\nzG+FA1jDaFETzf3I93k9mTXwVqO94FntT0QJo544evZG0R0SnU++0ED8Vf4GXjza\r\nHFa9llF7b1cq26KqltyMdMKVvvBulRP/F/A8rLIQjcxz++iPAsbw+zOzlTvjwsto\r\nWHPbqCRiOwY1nQ2pM714A5AuTHhdUDqB1O6gyHA43LL5Z/qHQF1hwFGPa4NrzQU6\r\nyuGnBXj8ytqU0CwIPX4WecigUCAkVDNx\r\n-----END CERTIFICATE-----',
|
||||
pinned: true,
|
||||
ignoreTLS: false
|
||||
},
|
||||
ignoreUploadOnSent: true
|
||||
},
|
||||
yahoo: {
|
||||
imap: {
|
||||
host: 'imap.mail.yahoo.com',
|
||||
port: 993,
|
||||
secure: true,
|
||||
ca: '-----BEGIN CERTIFICATE-----\r\nMIIFUjCCBDqgAwIBAgIQdThnkckQvgouzHOsQA7ctTANBgkqhkiG9w0BAQUFADCB\r\ntTELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL\r\nExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug\r\nYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDEvMC0GA1UEAxMm\r\nVmVyaVNpZ24gQ2xhc3MgMyBTZWN1cmUgU2VydmVyIENBIC0gRzMwHhcNMTQwNDIy\r\nMDAwMDAwWhcNMTUwNDIzMjM1OTU5WjCBjDELMAkGA1UEBhMCVVMxEzARBgNVBAgT\r\nCkNhbGlmb3JuaWExEjAQBgNVBAcUCVN1bm55dmFsZTETMBEGA1UEChQKWWFob28g\r\nSW5jLjEfMB0GA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\nAAOCAQEAVxsglXJTtBTCoTwOd6j0iJQ+P9cxFVqHcmbshEfEQBlPwr4Sp9tLJ4kj\r\nfVi0XorWU6e6e57dtYtxpcPz+6WNSNKT0B0IBOTUTIBwSLJMHxEZI6gSS/fo1agt\r\n81B06rB8Rhn4yHwyDO/9uRvXbNYiEgpa5e6gIpXY6h6p1HscQMcuROaUA9ETvGd8\r\nDKG4XSZE7QAF9iB9WSLa/IQUD4sGMDaMp2q4XkoWZTnyL1bEDKwUvw9Z17PxVmrF\r\n8c7S5HTNU+1kyZw2LJRu3SgtsYXSWA88WFiKUPuqU+EBXmbrwLAwLAJ6mVc2bGFC\r\ng5fLGbtTscaARBlb1u3Iee2Fd419jg==\r\n-----END CERTIFICATE-----',
|
||||
pinned: true,
|
||||
ignoreTLS: false
|
||||
},
|
||||
smtp: {
|
||||
host: 'smtp.mail.yahoo.com',
|
||||
port: 465,
|
||||
secure: true,
|
||||
ca: '-----BEGIN CERTIFICATE-----\r\nMIIHITCCBgmgAwIBAgIQBlVSvxlwsqw8Kc8eVV5EKTANBgkqhkiG9w0BAQUFADBm\r\nMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3\r\nd3cuZGlnaWNlcnQuY29tMSUwIwYDVQQDExxEaWdpQ2VydCBIaWdoIEFzc3VyYW5j\r\nZSBDQS0zMB4XDTE0MDYwNTAwMDAwMFoXDTE1MDYyMzEyMDAwMFowYjELMAkGA1UE\r\nBhMCVVMxCzAJBgNVBAgTAkNBMRIwEAYDVQQHEwlTdW5ueXZhbGUxFDASBgNVBAoM\r\nC1lhaG9vISBJbmMuMRwwGgYDVQQDExNzbXRwLm1haWwueWFob28uY29tMIIBIjAN\r\nBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA339OSxTIuW6NVqKwYHFBbg4/tmEx\r\nMYpzohtObPaWgvLTsYdce+WlQFBU5rxaCMUtVsVAGJWs5uQRDVHXRLPnOWe+foqZ\r\n5ItgjYIQc1XeMv6BZEeaF3Bum5ehUyLB3y48cjbWxma1QlkZ8XAK0f9AS7ySWAen\r\no5OXJlMFAqXGtKMAhY46dzSY0wjgdrvgiomFRy0iQKV1DxGsXoXSMEszlUTQoNQ3\r\nWTsiA3O//cdWE06wWeA3/90cb7QkU3KflSoyfi878BQGpPR1L+rLNsqnc8QuucbD\r\nz4Q++rxGqgg4QYrOtmZfAn96TXhPWCwKld6FN+f3uV5ITOBFx44M5v1ILQIDAQAB\r\no4IDzTCCA8kwHwYDVR0jBBgwFoAUUOpzidsp+xCPnuUBINTeeZlIg/cwHQYDVR0O\r\nBBYEFEhOpSFQjO/QrSNfVwyInZUhyzhsMIICJAYDVR0RBIICGzCCAheCE3NtdHAu\r\nbWFpbC55YWhvby5jb22CFnNtdHAubWFpbC55YWhvby5jb20uYXKCFnNtdHAubWFp\r\nbC55YWhvby5jb20uYXWCFnNtdHAubWFpbC55YWhvby5jb20uYnKCFnNtdHAubWFp\r\nbC55YWhvby5jb20uY26CFnNtdHAubWFpbC55YWhvby5jb20uaGuCFnNtdHAubWFp\r\nbC55YWhvby5jb20ubXmCFnNtdHAubWFpbC55YWhvby5jb20ucGiCFnNtdHAubWFp\r\nbC55YWhvby5jb20uc2eCFnNtdHAubWFpbC55YWhvby5jb20udHeCFnNtdHAubWFp\r\nbC55YWhvby5jb20udm6CFXNtdHAubWFpbC55YWhvby5jby5pZIIVc210cC5tYWls\r\nLnlhaG9vLmNvLmlughVzbXRwLm1haWwueWFob28uY28ua3KCFXNtdHAubWFpbC55\r\nYWhvby5jby50aIIVc210cC5tYWlsLnlhaG9vLmNvLnVrghJzbXRwLm1haWwueWFo\r\nb28uY2GCEnNtdHAubWFpbC55YWhvby5jboISc210cC5tYWlsLnlhaG9vLmRlghJz\r\nbXRwLm1haWwueWFob28uZXOCEnNtdHAubWFpbC55YWhvby5mcoISc210cC5tYWls\r\nLnlhaG9vLml0gg9zbXRwLnk3bWFpbC5jb22CFHNtdHAuY29ycmVvLnlhaG9vLmVz\r\nMA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIw\r\nYQYDVR0fBFowWDAqoCigJoYkaHR0cDovL2NybDMuZGlnaWNlcnQuY29tL2NhMy1n\r\nMjguY3JsMCqgKKAmhiRodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vY2EzLWcyOC5j\r\ncmwwQgYDVR0gBDswOTA3BglghkgBhv1sAQEwKjAoBggrBgEFBQcCARYcaHR0cHM6\r\nLy93d3cuZGlnaWNlcnQuY29tL0NQUzB7BggrBgEFBQcBAQRvMG0wJAYIKwYBBQUH\r\nMAGGGGh0dHA6Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBFBggrBgEFBQcwAoY5aHR0cDov\r\nL2NhY2VydHMuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0SGlnaEFzc3VyYW5jZUNBLTMu\r\nY3J0MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQEFBQADggEBABshjUND4hADHGfe\r\ncV9XGXcr9h3u7mT5kgdcgGFhcrFAlwkzt0NUCbuN0X8DWHE72Tpb3zRE25CmUUJe\r\nktBbq9PQb4b5/Wt1htAEw0qUs3BsUbqejK9OHJ/11Jn2ek4+SLJuYlijzc7KM3F/\r\nyz7ZTZtKR0PglkXfqbpvWYGabYpfL2FRLoJ7alTLsMJcFxbSLYcAIMxufj7RyTBJ\r\nbKgRJl4wmP4+Zc2Q1p59mENY0u5HqVAAOmWc0jNb0/31+tRr5f6EgXxK++7TQOpF\r\n0TOaFsXlzRlpKfmIbzVr2nfwghV5/bRZj96TK3g1OoOz4C8ksK4INHnUdTAqZ18M\r\nvHpnJw4=\r\n-----END CERTIFICATE-----',
|
||||
pinned: true,
|
||||
ignoreTLS: false
|
||||
}
|
||||
},
|
||||
tonline: {
|
||||
imap: {
|
||||
host: 'secureimap.t-online.de',
|
||||
port: 993,
|
||||
secure: true,
|
||||
ca: '-----BEGIN CERT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oiXeJrS/rPLiKkDaBc/Rn1lzKI2mmWzrU15YsGGTaG7rIRlY7vq\r\noXEox6sEWZxTclyP8m/fd8fZpJMH2U6GuTavXJ/AK//9fMzuvGgQsQsyxws9tm4Q\r\nCd3oSVd/daUbHQ+6BIBRPyyM55S1DQDH6V4+tLFZfiZwcjZpJy2Fstd6U60P0gqJ\r\nWQQpZUER4nXTbAm8AH1G3xe34lFoNgS+lhuCuKKsPJ49PhhHWVAzlQFqfol1s9Bi\r\ns7EXLeoDyhJrvTjSqPaX87PaKt0W0+N7h/fpNgcMfhE=\r\n-----END CERTIFICATE-----',
|
||||
pinned: true,
|
||||
ignoreTLS: false
|
||||
},
|
||||
smtp: {
|
||||
host: 'securesmtp.t-online.de',
|
||||
port: 465,
|
||||
secure: true,
|
||||
ca: '-----BEGIN CERTIFICATE-----\r\nMIIGrDCCBZSgAwIBAgIJAMdeAVgqw77nMA0GCSqGSIb3DQEBCwUAMHExCzAJBgNV\r\nBAYTAkRFMRwwGgYDVQQKExNEZXV0c2NoZSBUZWxla29tIEFHMR8wHQYDVQQLExZU\r\nLVRlbGVTZWMgVHJ1c3QgQ2VudGVyMSMwIQYDVQQDExpEZXV0c2NoZSBUZWxla29t\r\nIFJvb3QgQ0EgMjAeFw0xNDAyMTExNDMwMTdaFw0xOTA3MDkyMzU5MDBaMIHZMQsw\r\nCQYDVQQGEwJERTElMCMGA1UEChMcVC1TeXN0ZW1zIEludGVybmF0aW9uYWwgR21i\r\nSDEfMB0GA1UECxMWVC1TeXN0ZW1zIFRydXN0IENlbnRlcjEcMBoGA1UECBMTTm9y\r\nZHJoZWluIFdlc3RmYWxlbjEOMAwGA1UEERMFNTcyNTAxEDAOBgNVBAcTB05ldHBo\r\nZW4xIDAeBgNVBAkTF1VudGVyZSBJbmR1c3RyaWVzdHIuIDIwMSAwHgYDVQQDExdU\r\nZWxlU2VjIFNlcnZlclBhc3MgREUtMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC\r\nAQoCggEB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lYy5k\r\nZS9vY3NwcjBBBggrBgEFBQcwAoY1aHR0cDovL2NybC5zZXJ2ZXJwYXNzLnRlbGVz\r\nZWMuZGUvY3J0L0RUX1JPT1RfQ0FfMi5jZXIwgZ8GCCsGAQUFBzAChoGSbGRhcDov\r\nL2xkYXAuc2VydmVycGFzcy50ZWxlc2VjLmRlL0NOPURldXRzY2hlJTIwVGVsZWtv\r\nbSUyMFJvb3QlMjBDQSUyMDIsT1U9VC1UZWxlU2VjJTIwVHJ1c3QlMjBDZW50ZXIs\r\nTz1EZXV0c2NoZSUyMFRlbGVrb20lMjBBRyxDPURFP2NBQ2VydGlmaWNhdGUwDQYJ\r\nKoZIhvcNAQELBQADggEBACxszDCOWtQ4zj/Uozfb/si6Ss5tqgfoSlQ5tTan3Ffo\r\nsKvuDMAIv6uUDoiXeJrS/rPLiKkDaBc/Rn1lzKI2mmWzrU15YsGGTaG7rIRlY7vq\r\noXEox6sEWZxTclyP8m/fd8fZpJMH2U6GuTavXJ/AK//9fMzuvGgQsQsyxws9tm4Q\r\nCd3oSVd/daUbHQ+6BIBRPyyM55S1DQDH6V4+tLFZfiZwcjZpJy2Fstd6U60P0gqJ\r\nWQQpZUER4nXTbAm8AH1G3xe34lFoNgS+lhuCuKKsPJ49PhhHWVAzlQFqfol1s9Bi\r\ns7EXLeoDyhJrvTjSqPaX87PaKt0W0+N7h/fpNgcMfhE=\r\n-----END CERTIFICATE-----',
|
||||
pinned: true,
|
||||
ignoreTLS: false
|
||||
}
|
||||
},
|
||||
outlook: {
|
||||
imap: {
|
||||
host: 'imap-mail.outlook.com',
|
||||
port: 993,
|
||||
secure: true,
|
||||
ca: '-----BEGIN CERTIFICATE-----\r\nMIIFQjCCBCqgAwIBAgISESHl0vjrML7zKmGlv42YL75vMA0GCSqGSIb3DQEBBQUA\r\nMF0xCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTMwMQYD\r\nVQQDEypHbG9iYWxTaWduIE9yZ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sG\r\nAQUFBwEBBIGJMIGGMEcGCCsGAQUFBzAChjtodHRwOi8vc2VjdXJlLmdsb2JhbHNp\r\nZ24uY29tL2NhY2VydC9nc29yZ2FuaXphdGlvbnZhbGcyLmNydDA7BggrBgEFBQcw\r\nAYYvaHR0cDovL29jc3AyLmdsb2JhbHNpZ24uY29tL2dzb3JnYW5pemF0aW9udmFs\r\nZzIwHQYDVR0OBBYEFHbgHqTLsXDt7uMRyE62rnDEfLn9MB8GA1UdIwQYMBaAFF1G\r\nso3ES3Qcu+31c7Y6tziPdZ5+MA0GCSqGSIb3DQEBBQUAA4IBAQByy1+3N6ZRVooI\r\nxqw8Ng+UFz0g7UHkbPEnvTu1uxJ2AojFuP/P1PAk+/6uMRvpPlWg/5uqmOIWxKxJ\r\nLo6xSbkDf4LN+KYwes3XSuPyziZ4QbPnehHhZ0377iiA8fpRJADg9NWKCRHh5aAd\r\ne9QvJUW/GgYkBN+F4yYc2jIjR3Rehv4JYOKS3iXO9OoHsDS2CcCFaS2imgQVfYLg\r\nslBwT/A08PCOhW5huiluSmih7x5Qf7sFDv8jineu6ehKzi8pKnOq4k8G4QiWn38Y\r\nCeiBkkwFOwj7T3M/ITiiSS9DHDGeokj16eBi83Zx3YYiJ9YZvnQ+4GvqJ5eJJ6pR\r\nKKvemr+m\r\n-----END CERTIFICATE-----',
|
||||
pinned: true,
|
||||
ignoreTLS: false
|
||||
},
|
||||
smtp: {
|
||||
host: 'smtp-mail.outlook.com',
|
||||
port: 587,
|
||||
secure: false,
|
||||
ca: '-----BEGIN CERTIFICATE-----\r\nMIIFQjCCBCqgAwIBAgISESHl0vjrML7zKmGlv42YL75vMA0GCSqGSIb3DQEBBQUA\r\nMF0xCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTMwMQYD\r\nVQQDEypHbG9iYWxTaWduIE9yZ2FuaXphdGlvbiBWYWxpZGF0aW9uIENBIC0gRzIw\r\nHhcNMTMwNDI0MjAzNTA5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2JhbHNp\r\nZ24uY29tL2NhY2VydC9nc29yZ2FuaXphdGlvbnZhbGcyLmNydDA7BggrBgEFBQcw\r\nAYYvaHR0cDovL29jc3AyLmdsb2JhbHNpZ24uY29tL2dzb3JnYW5pemF0aW9udmFs\r\nZzIwHQYDVR0OBBYEFHbgHqTLsXDt7uMRyE62rnDEfLn9MB8GA1UdIwQYMBaAFF1G\r\nso3ES3Qcu+31c7Y6tziPdZ5+MA0GCSqGSIb3DQEBBQUAA4IBAQByy1+3N6ZRVooI\r\nxqw8Ng+UFz0g7UHkbPEnvTu1uxJ2AojFuP/P1PAk+/6uMRvpPlWg/5uqmOIWxKxJ\r\nLo6xSbkDf4LN+KYwes3XSuPyziZ4QbPnehHhZ0377iiA8fpRJADg9NWKCRHh5aAd\r\ne9QvJUW/GgYkBN+F4yYc2jIjR3Rehv4JYOKS3iXO9OoHsDS2CcCFaS2imgQVfYLg\r\nslBwT/A08PCOhW5huiluSmih7x5Qf7sFDv8jineu6ehKzi8pKnOq4k8G4QiWn38Y\r\nCeiBkkwFOwj7T3M/ITiiSS9DHDGeokj16eBi83Zx3YYiJ9YZvnQ+4GvqJ5eJJ6pR\r\nKKvemr+m\r\n-----END CERTIFICATE-----',
|
||||
pinned: true,
|
||||
ignoreTLS: false
|
||||
}
|
||||
},
|
||||
gmx: {
|
||||
imap: {
|
||||
host: 'imap.gmx.net',
|
||||
port: 993,
|
||||
secure: true,
|
||||
ca: '-----BEGIN CERTIFICATE-----\r\nMIIHUDCCBjigAwIBAgIIM52e2Oc5J8kwDQYJKoZIhvcNAQEFBQAwgckxCzAJBgNV\r\nBAYTAkRFMSUwIwYDVQQKExxULVN5c3RlbXMgSW50ZXJuYXRpb25hbCBHbWJIMR8w\r\nHQYDVQQLExZULVN5c3RlbXMgVHJ1c3QgQ2VudGVyMQwwCgYDVQQIEwNOUlcxDjAM\r\nBgNVBBETBTU3MjUwMRAwDgYDVQQHEwdOZXRwaGVuMSAwHgYDVQQJExdVbnRlcmUg\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\nJcowS09ZtZ+khb1OkzXAAbEqNj0oyH/1K550d5Ir5VbXF0ZdVKVTzEFRyjvUt5NJ\r\n/b6Q2bbY/sPm8QiK9SPaYkO5/3J1KB0u7PkqqfOhZ9UJE6mIN66T2bpFmAwle3zL\r\n6+L/VwYSgUNs/w2l6xWlYP3pFFaT12TO43Q057I3vP7yCt3QE/VLDpdQOQ3H0oy2\r\nJQGPJLFby9MPYNkmEmwjh4e95TAY4ZkZMe08ix0J1Smy8DwjTz6SXqYC+EC/PQlh\r\nE0UHxA==\r\n-----END CERTIFICATE-----',
|
||||
pinned: true,
|
||||
ignoreTLS: false
|
||||
},
|
||||
smtp: {
|
||||
host: 'mail.gmx.net',
|
||||
port: 587,
|
||||
secure: false,
|
||||
ca: '-----BEGIN CERTIFICATE-----\r\nMIIHbDCCBlSgAwIBAgIJAJ74Ek9UaA0TMA0GCSqGSIb3DQEBBQUAMIHJMQswCQYD\r\nVQQGEwJERTElMCMGA1UEChMcVC1TeXN0ZW1zIEludGVybmF0aW9uYWwgR21iSDEf\r\nMB0GA1UECxMWVC1TeXN0ZW1zIFRydXN0IENlbnRlcjEMMAoGA1UECBMDTlJXMQ4w\r\nDAYDVQQREwU1NzI1MDEQMA4GA1UEBxMHTmV0cGhlbjEgMB4GA1UECRMXVW50ZXJl\r\nIEluZHVzdHJpZXN0ci4gMjAxIDAeBgNVBAMTF1RlbGVTZWMgU2VydmVyUGFzcyBE\r\nRS0xMB4XDTEzMTExMjEwMTY0N1oXDTE2MTExNzIzNTk1OVowgZ0xCzAJBgNVBAYT\r\nAkRFMR4wHAYDVQQKDBUxJjEgTWFpbCAmIE1lZGlhIEdtYkgxHTAbBgNVBAgTFFJo\r\naW5lbGFuZC1QYWxhdGluYXRlMRIwEAYDVQQHEwlNb250YWJhdXIxJDAiBgkqhkiG\r\n9w0BCQEWFXNlcnZlci1jZXJ0c0AxdW5kMS5kZTEVMBMGA1UEAxMMbWFpbC5nbXgu\r\nbmV0MIIBIjANBgkqhki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YXAuc2VydmVycGFzcy50\r\nZWxlc2VjLmRlL2NuPVRlbGVTZWMlMjBTZXJ2ZXJQYXNzJTIwREUtMSxvdT1ULVN5\r\nc3RlbXMlMjBUcnVzdCUyMENlbnRlcixvPVQtU3lzdGVtcyUyMEludGVybmF0aW9u\r\nYWwlMjBHbWJILGM9ZGU/Y0FDZXJ0aWZpY2F0ZTAMBgNVHRMBAf8EAjAAMBYGA1Ud\r\nEQQPMA2CC2ltYXAud2ViLmRlMA0GCSqGSIb3DQEBBQUAA4IBAQAp7MQjjOWQ0M7N\r\n21GrPDfWSMR3eJnuMs37I9G2t9i99w7xKtmoVBPyYMORL1zRHn/DEguo4j5ua7CH\r\nrKLh9Sd1wDKqVWGFxvmP4f/mvEx5YVI68mg+M2VQf/h58IXTTZRbUcsv3HVeruI6\r\npgQNUsEQqRVJmrgT/iPd98RhhzBqef6Wfrt3Ns6N835egphxUVcVj/v/PqBCZKQb\r\nNl5QsoaHDqh3XC+Og2awOGvWHUzxUKEqkP5nsMs2YjfOtcQRtxdislQAfRktuUBA\r\nWMZAlvoVF/CIyFvcUH11KNur7HfK5PptvtdvLQaF2c+lN+LGP6D+nbTLqAo1v09o\r\nnZpHbQOt\r\n-----END CERTIFICATE-----',
|
||||
pinned: true,
|
||||
ignoreTLS: false
|
||||
},
|
||||
smtp: {
|
||||
host: 'smtp.web.de',
|
||||
port: 587,
|
||||
secure: false,
|
||||
ca: '-----BEGIN CERTIFICATE-----\r\nMIIHUzCCBjugAwIBAgIJAKaEwtMgQ2s5MA0GCSqGSIb3DQEBBQUAMIHJMQswCQYD\r\nVQQGEwJERTElMCMGA1UEChMcVC1TeXN0ZW1zIEludGVybmF0aW9uYWwgR21iSDEf\r\nMB0GA1UECxMWVC1TeXN0ZW1zIFRydXN0IENlbnRlcjEMMAoGA1UECBMDTlJXMQ4w\r\nDAYDVQQREwU1NzI1MDEQMA4GA1UEBxMHTmV0cGhlbjEgMB4GA1UECRMXVW50ZXJl\r\nIEluZHVzd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9Oc8JzVHoVEAgqlEeO6OYxrGE6SaSjZODJxPaEtU\r\nzEAKf0HVJQoGaU6fD+/8l3yhksAlsF/L85nP+KcZtoancOkJWE0GQMZp7pdLU0Ou\r\nFUQoAcqMIyHQfDqJ5iwvx/9C7jmy3Nvw9tXdPrdn2O7ywrnFeJuT2xiorZzg6ezn\r\nUlc/sMvd/LPX0f60pSQr9tkZgU4f8Jvx9EvPUCFTRXlXqkBIhgJhgCadZC+wKB1P\r\neQMS8rksXw==\r\n-----END CERTIFICATE-----',
|
||||
pinned: true,
|
||||
ignoreTLS: false
|
||||
}
|
||||
},
|
||||
checkOutboxInterval: 5000,
|
||||
iconPath: '/img/icon-128-chrome.png',
|
||||
verificationUrl: '/verify/',
|
||||
@ -177,8 +49,6 @@ function setConfigParams(manifest) {
|
||||
cfg.cloudUrl = getUrl('https://keys');
|
||||
// get keychain server base url
|
||||
cfg.privkeyServerUrl = getUrl('https://keychain');
|
||||
// get client ID for OAuth requests
|
||||
cfg.gmail.clientId = manifest.oauth2.client_id;
|
||||
// get the app version
|
||||
cfg.appVersion = manifest.version;
|
||||
}
|
||||
|
@ -278,6 +278,8 @@ ctrl.onConnect = function(callback) {
|
||||
imapClient.onCert = ctrl._auth.handleCertificateUpdate.bind(ctrl._auth, 'imap', ctrl.onConnect, ctrl.onError);
|
||||
pgpMailer.onCert = ctrl._auth.handleCertificateUpdate.bind(ctrl._auth, 'smtp', ctrl.onConnect, ctrl.onError);
|
||||
|
||||
// TODO: remove provider here
|
||||
|
||||
// after-setup configuration depending on the provider:
|
||||
// gmail does not require you to upload to the sent items folder
|
||||
// after successful sending, whereas most other providers do
|
||||
|
@ -36,7 +36,8 @@ var DialogCtrl = require('./controller/dialog'),
|
||||
ActionBarCtrl = require('./controller/action-bar'),
|
||||
errorUtil = require('./util/error'),
|
||||
backButtonUtil = require('./util/backbutton-handler');
|
||||
require('./directives/common');
|
||||
require('./directives/common'),
|
||||
require('./services/mail-config');
|
||||
|
||||
// init main angular module including dependencies
|
||||
var app = angular.module('mail', [
|
||||
@ -51,7 +52,8 @@ var app = angular.module('mail', [
|
||||
'privatekey-upload',
|
||||
'infinite-scroll',
|
||||
'ngTagsInput',
|
||||
'woDirectives'
|
||||
'woDirectives',
|
||||
'woServices'
|
||||
]);
|
||||
|
||||
// set router paths
|
||||
|
@ -1,13 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
var axe = require('axe-logger'),
|
||||
cfg = require('../app-config').config,
|
||||
str = require('../app-config').string;
|
||||
|
||||
var EMAIL_ADDR_DB_KEY = 'emailaddress';
|
||||
var USERNAME_DB_KEY = 'username';
|
||||
var REALNAME_DB_KEY = 'realname';
|
||||
var PASSWD_DB_KEY = 'password';
|
||||
var PROVIDER_DB_KEY = 'provider';
|
||||
var IMAP_DB_KEY = 'imap';
|
||||
var SMTP_DB_KEY = 'smtp';
|
||||
|
||||
@ -18,7 +18,7 @@ var SMTP_DB_KEY = 'smtp';
|
||||
* var auth = new Auth(...);
|
||||
* auth.setCredentials(...); // during the account setup
|
||||
* auth.getEmailAddress(...); // called from the login controller to determine if there is already a user present on the device
|
||||
* auth.getCredentials(...); // called to gather all the information to connect to IMAP/SMTP, e.g. pinned intermediate certificates,
|
||||
* auth.getCredentials(...); // called to gather all the information to connect to IMAP/SMTP,
|
||||
* username, password / oauth token, IMAP/SMTP server host names, ...
|
||||
*/
|
||||
var Auth = function(appConfigStore, oauth, pgp) {
|
||||
@ -39,7 +39,7 @@ var Auth = function(appConfigStore, oauth, pgp) {
|
||||
Auth.prototype.getCredentials = function(callback) {
|
||||
var self = this;
|
||||
|
||||
if (!self.provider || !self.emailAddress) {
|
||||
if (!self.emailAddress) {
|
||||
// we're not yet initialized, so let's load our stuff from disk
|
||||
self._loadCredentials(function(err) {
|
||||
if (err) {
|
||||
@ -54,8 +54,8 @@ Auth.prototype.getCredentials = function(callback) {
|
||||
chooseLogin();
|
||||
|
||||
function chooseLogin() {
|
||||
if (self.provider === 'gmail' && !self.password) {
|
||||
// oauth login for gmail
|
||||
if (self.useOAuth(self.imap.host) && !self.password) {
|
||||
// oauth login
|
||||
self.getOAuthToken(function(err) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
@ -91,7 +91,6 @@ Auth.prototype.getCredentials = function(callback) {
|
||||
port: self.imap.port,
|
||||
host: self.imap.host,
|
||||
ca: self.imap.ca,
|
||||
pinned: self.imap.pinned,
|
||||
auth: {
|
||||
user: self.username,
|
||||
xoauth2: self.oauthToken, // password or oauthToken is undefined
|
||||
@ -103,7 +102,6 @@ Auth.prototype.getCredentials = function(callback) {
|
||||
port: self.smtp.port,
|
||||
host: self.smtp.host,
|
||||
ca: self.smtp.ca,
|
||||
pinned: self.smtp.pinned,
|
||||
auth: {
|
||||
user: self.username,
|
||||
xoauth2: self.oauthToken,
|
||||
@ -119,7 +117,6 @@ Auth.prototype.getCredentials = function(callback) {
|
||||
/**
|
||||
* Set the credentials
|
||||
*
|
||||
* @param {String} options.provider The service provider, e.g. 'gmail', 'yahoo', 'tonline'. Matches the entry in the app-config.
|
||||
* @param {String} options.emailAddress The email address
|
||||
* @param {String} options.username The user name
|
||||
* @param {String} options.realname The user's real name
|
||||
@ -129,13 +126,12 @@ Auth.prototype.getCredentials = function(callback) {
|
||||
*/
|
||||
Auth.prototype.setCredentials = function(options) {
|
||||
this.credentialsDirty = true;
|
||||
this.provider = options.provider;
|
||||
this.emailAddress = options.emailAddress;
|
||||
this.username = options.username;
|
||||
this.realname = options.realname ? options.realname : '';
|
||||
this.password = options.password;
|
||||
this.smtp = options.smtp; // host, port, secure, ca, pinned
|
||||
this.imap = options.imap; // host, port, secure, ca, pinned
|
||||
this.smtp = options.smtp; // host, port, secure, ca
|
||||
this.imap = options.imap; // host, port, secure, ca
|
||||
};
|
||||
|
||||
Auth.prototype.storeCredentials = function(callback) {
|
||||
@ -145,7 +141,7 @@ Auth.prototype.storeCredentials = function(callback) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
// persist the provider
|
||||
// persist the config
|
||||
self._appConfigStore.storeList([self.smtp], SMTP_DB_KEY, function(err) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
@ -156,57 +152,51 @@ Auth.prototype.storeCredentials = function(callback) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
self._appConfigStore.storeList([self.provider], PROVIDER_DB_KEY, function(err) {
|
||||
self._appConfigStore.storeList([self.emailAddress], EMAIL_ADDR_DB_KEY, function(err) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
self._appConfigStore.storeList([self.emailAddress], EMAIL_ADDR_DB_KEY, function(err) {
|
||||
self._appConfigStore.storeList([self.username], USERNAME_DB_KEY, function(err) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
self._appConfigStore.storeList([self.username], USERNAME_DB_KEY, function(err) {
|
||||
self._appConfigStore.storeList([self.realname], REALNAME_DB_KEY, function(err) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
self._appConfigStore.storeList([self.realname], REALNAME_DB_KEY, function(err) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
if (!self.password) {
|
||||
self.credentialsDirty = false;
|
||||
return callback();
|
||||
}
|
||||
|
||||
if (!self.password) {
|
||||
self.credentialsDirty = false;
|
||||
return callback();
|
||||
}
|
||||
|
||||
if (self.passwordNeedsDecryption) {
|
||||
// password is not decrypted yet, so no need to re-encrypt it before storing...
|
||||
self._appConfigStore.storeList([self.password], PASSWD_DB_KEY, function(err) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
self.credentialsDirty = false;
|
||||
callback();
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
self._pgp.encrypt(self.password, undefined, function(err, ciphertext) {
|
||||
if (self.passwordNeedsDecryption) {
|
||||
// password is not decrypted yet, so no need to re-encrypt it before storing...
|
||||
self._appConfigStore.storeList([self.password], PASSWD_DB_KEY, function(err) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
self._appConfigStore.storeList([ciphertext], PASSWD_DB_KEY, function(err) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
self.credentialsDirty = false;
|
||||
callback();
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
self.credentialsDirty = false;
|
||||
callback();
|
||||
});
|
||||
self._pgp.encrypt(self.password, undefined, function(err, ciphertext) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
self._appConfigStore.storeList([ciphertext], PASSWD_DB_KEY, function(err) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
self.credentialsDirty = false;
|
||||
callback();
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -241,6 +231,26 @@ Auth.prototype.getEmailAddress = function(callback) {
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if the current platform and mail provider support OAuth.
|
||||
* @param {String} hostname The hostname of the mail server e.g. imap.gmail.com
|
||||
* @return {Boolean} If oauth should be used
|
||||
*/
|
||||
Auth.prototype.useOAuth = function(hostname) {
|
||||
if (!this._oauth.isSupported()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var regex = cfg.oauthDomains;
|
||||
for (var i = 0; i < regex.length; i++) {
|
||||
if (regex[i].test(hostname)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* READ FIRST b/c usage of the oauth api is weird.
|
||||
* the chrome identity api will let you query an oauth token for an email account without knowing
|
||||
@ -291,7 +301,7 @@ Auth.prototype.getOAuthToken = function(callback) {
|
||||
};
|
||||
|
||||
/**
|
||||
* Loads email address, password, provider, ... from disk and sets them on `this`
|
||||
* Loads email address, password, ... from disk and sets them on `this`
|
||||
*/
|
||||
Auth.prototype._loadCredentials = function(callback) {
|
||||
var self = this;
|
||||
@ -334,23 +344,16 @@ Auth.prototype._loadCredentials = function(callback) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
loadFromDB(PROVIDER_DB_KEY, function(err, provider) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
self.emailAddress = emailAddress;
|
||||
self.password = password;
|
||||
self.passwordNeedsDecryption = !!password;
|
||||
self.username = username;
|
||||
self.realname = realname;
|
||||
self.smtp = smtp;
|
||||
self.imap = imap;
|
||||
self.initialized = true;
|
||||
|
||||
self.emailAddress = emailAddress;
|
||||
self.password = password;
|
||||
self.passwordNeedsDecryption = !!password;
|
||||
self.provider = provider;
|
||||
self.username = username;
|
||||
self.realname = realname;
|
||||
self.smtp = smtp;
|
||||
self.imap = imap;
|
||||
self.initialized = true;
|
||||
|
||||
callback();
|
||||
});
|
||||
callback();
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -389,16 +392,6 @@ Auth.prototype.handleCertificateUpdate = function(component, onConnect, callback
|
||||
return;
|
||||
}
|
||||
|
||||
if (self[component].ca && self[component].pinned) {
|
||||
// do not update the pinned certificates!
|
||||
callback({
|
||||
title: str.outdatedCertificateTitle,
|
||||
message: str.outdatedCertificateMessage.replace('{0}', self[component].host),
|
||||
faqLink: str.certificateFaqLink,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// previous ssl cert known, does not match: query user and certificate
|
||||
callback({
|
||||
title: str.updateCertificateTitle,
|
||||
|
@ -1,9 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
var appCtrl = require('../app-controller'),
|
||||
cfg = require('../app-config').config;
|
||||
var appCtrl = require('../app-controller');
|
||||
|
||||
var AddAccountCtrl = function($scope, $location, $routeParams, $http) {
|
||||
var AddAccountCtrl = function($scope, $location, $routeParams, mailConfig) {
|
||||
if (!appCtrl._auth && !$routeParams.dev) {
|
||||
$location.path('/'); // init app
|
||||
return;
|
||||
@ -18,12 +17,7 @@ var AddAccountCtrl = function($scope, $location, $routeParams, $http) {
|
||||
$scope.busy = true;
|
||||
$scope.errMsg = undefined; // reset error msg
|
||||
|
||||
var domain = $scope.emailAddress.split('@')[1];
|
||||
var url = cfg.settingsUrl + domain;
|
||||
|
||||
return $http.get(url).then(function(res) {
|
||||
var config = res.data;
|
||||
|
||||
return mailConfig.get($scope.emailAddress).then(function(config) {
|
||||
$scope.busy = false;
|
||||
$scope.state.login = {
|
||||
mailConfig: config,
|
||||
@ -31,14 +25,11 @@ var AddAccountCtrl = function($scope, $location, $routeParams, $http) {
|
||||
};
|
||||
|
||||
var hostname = config.imap.hostname;
|
||||
if (hostname && hostname.match(/.gmail.com$/) || hostname.match(/.googlemail.com$/)) {
|
||||
// check for gmail/oauth support
|
||||
$scope.connectToGoogle();
|
||||
} else if (config.imap.source === 'guess') {
|
||||
// use standard password login... show config details due to guess
|
||||
$scope.setCredentials('custom');
|
||||
if (appCtrl._auth.useOAuth(hostname)) {
|
||||
// check for oauth support
|
||||
$scope.oauthPossible();
|
||||
} else {
|
||||
// use standard password login... hide config details
|
||||
// use standard password login
|
||||
$scope.setCredentials();
|
||||
}
|
||||
|
||||
@ -48,50 +39,41 @@ var AddAccountCtrl = function($scope, $location, $routeParams, $http) {
|
||||
});
|
||||
};
|
||||
|
||||
$scope.connectToGoogle = function() {
|
||||
// test for oauth support
|
||||
if (appCtrl._auth._oauth.isSupported()) {
|
||||
// ask user to use the platform's native OAuth api
|
||||
$scope.onError({
|
||||
title: 'Google Account Login',
|
||||
message: 'You are signing into a Google account. Would you like to sign in with Google or just continue with a password login?',
|
||||
positiveBtnStr: 'Google sign in',
|
||||
negativeBtnStr: 'Password',
|
||||
showNegativeBtn: true,
|
||||
faqLink: 'https://github.com/whiteout-io/mail-html5/wiki/FAQ#how-does-sign-in-with-google-work',
|
||||
callback: function(granted) {
|
||||
if (granted) {
|
||||
// query oauth token
|
||||
useOAuth();
|
||||
} else {
|
||||
// use normal user/password login
|
||||
$scope.setCredentials('gmail');
|
||||
$scope.$apply();
|
||||
}
|
||||
$scope.oauthPossible = function() {
|
||||
// ask user to use the platform's native OAuth api
|
||||
$scope.onError({
|
||||
title: 'Google Account Login',
|
||||
message: 'You are signing into a Google account. Would you like to sign in with Google or just continue with a password login?',
|
||||
positiveBtnStr: 'Google sign in',
|
||||
negativeBtnStr: 'Password',
|
||||
showNegativeBtn: true,
|
||||
faqLink: 'https://github.com/whiteout-io/mail-html5/wiki/FAQ#how-does-sign-in-with-google-work',
|
||||
callback: function(granted) {
|
||||
if (granted) {
|
||||
// query oauth token
|
||||
getOAuthToken();
|
||||
} else {
|
||||
// use normal user/password login
|
||||
$scope.setCredentials();
|
||||
$scope.$apply();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// no oauth support
|
||||
// use normal user/password login
|
||||
$scope.setCredentials('gmail');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function useOAuth() {
|
||||
function getOAuthToken() {
|
||||
// fetches the email address from the chrome identity api
|
||||
appCtrl._auth.getOAuthToken(function(err) {
|
||||
if (err) {
|
||||
return $scope.onError(err);
|
||||
}
|
||||
$scope.setCredentials('gmail');
|
||||
$scope.setCredentials();
|
||||
$scope.$apply();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.setCredentials = function(provider) {
|
||||
$location.path('/login-set-credentials').search({
|
||||
provider: provider
|
||||
});
|
||||
$scope.setCredentials = function() {
|
||||
$location.path('/login-set-credentials');
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -19,53 +19,47 @@ var SetCredentialsCtrl = function($scope, $location, $routeParams) {
|
||||
// Presets and Settings
|
||||
//
|
||||
|
||||
var provider = $location.search().provider;
|
||||
$scope.hasProviderPreset = ($scope.state.login && $scope.state.login.mailConfig);
|
||||
var mailConfig = $scope.state.login.mailConfig;
|
||||
$scope.useOAuth = !!auth.oauthToken;
|
||||
$scope.showDetails = (provider === 'custom');
|
||||
$scope.showDetails = (mailConfig.imap.source === 'guess');
|
||||
|
||||
// set email address
|
||||
if ($scope.useOAuth) {
|
||||
$scope.emailAddress = auth.emailAddress;
|
||||
} else if ($scope.state.login) {
|
||||
} else {
|
||||
$scope.emailAddress = $scope.state.login.emailAddress;
|
||||
}
|
||||
|
||||
if ($scope.hasProviderPreset) {
|
||||
// use editable presets
|
||||
var mailConfig = $scope.state.login.mailConfig;
|
||||
// SMTP config
|
||||
$scope.smtpHost = mailConfig.smtp.hostname;
|
||||
$scope.smtpPort = parseInt(mailConfig.smtp.port, 10);
|
||||
|
||||
// SMTP config
|
||||
$scope.smtpHost = mailConfig.smtp.hostname;
|
||||
$scope.smtpPort = parseInt(mailConfig.smtp.port, 10);
|
||||
// $scope.smtpCert = config[provider].smtp.ca;
|
||||
// $scope.smtpPinned = config[provider].smtp.pinned;
|
||||
|
||||
// transport encryption method
|
||||
if (mailConfig.smtp.secure && !mailConfig.smtp.ignoreTLS) {
|
||||
$scope.smtpEncryption = ENCRYPTION_METHOD_TLS;
|
||||
} else if (!mailConfig.smtp.secure && !mailConfig.smtp.ignoreTLS) {
|
||||
$scope.smtpEncryption = ENCRYPTION_METHOD_STARTTLS;
|
||||
} else {
|
||||
$scope.smtpEncryption = ENCRYPTION_METHOD_NONE;
|
||||
}
|
||||
|
||||
// IMAP config
|
||||
$scope.imapHost = mailConfig.imap.hostname;
|
||||
$scope.imapPort = parseInt(mailConfig.imap.port, 10);
|
||||
// $scope.imapCert = config[provider].imap.ca;
|
||||
// $scope.imapPinned = config[provider].imap.pinned;
|
||||
|
||||
// transport encryption method
|
||||
if (mailConfig.imap.secure && !mailConfig.imap.ignoreTLS) {
|
||||
$scope.imapEncryption = ENCRYPTION_METHOD_TLS;
|
||||
} else if (!mailConfig.imap.secure && !mailConfig.imap.ignoreTLS) {
|
||||
$scope.imapEncryption = ENCRYPTION_METHOD_STARTTLS;
|
||||
} else {
|
||||
$scope.imapEncryption = ENCRYPTION_METHOD_NONE;
|
||||
}
|
||||
// transport encryption method
|
||||
if (mailConfig.smtp.secure && !mailConfig.smtp.ignoreTLS) {
|
||||
$scope.smtpEncryption = ENCRYPTION_METHOD_TLS;
|
||||
} else if (!mailConfig.smtp.secure && !mailConfig.smtp.ignoreTLS) {
|
||||
$scope.smtpEncryption = ENCRYPTION_METHOD_STARTTLS;
|
||||
} else {
|
||||
$scope.smtpEncryption = ENCRYPTION_METHOD_NONE;
|
||||
}
|
||||
|
||||
// IMAP config
|
||||
$scope.imapHost = mailConfig.imap.hostname;
|
||||
$scope.imapPort = parseInt(mailConfig.imap.port, 10);
|
||||
|
||||
// transport encryption method
|
||||
if (mailConfig.imap.secure && !mailConfig.imap.ignoreTLS) {
|
||||
$scope.imapEncryption = ENCRYPTION_METHOD_TLS;
|
||||
} else if (!mailConfig.imap.secure && !mailConfig.imap.ignoreTLS) {
|
||||
$scope.imapEncryption = ENCRYPTION_METHOD_STARTTLS;
|
||||
} else {
|
||||
$scope.imapEncryption = ENCRYPTION_METHOD_NONE;
|
||||
}
|
||||
|
||||
//
|
||||
// Scope functions
|
||||
//
|
||||
|
||||
$scope.test = function() {
|
||||
// parse the <select> dropdown lists
|
||||
var imapEncryption = parseInt($scope.imapEncryption, 10);
|
||||
@ -73,7 +67,6 @@ var SetCredentialsCtrl = function($scope, $location, $routeParams) {
|
||||
|
||||
// build credentials object
|
||||
var credentials = {
|
||||
provider: provider,
|
||||
emailAddress: $scope.emailAddress,
|
||||
username: $scope.username || $scope.emailAddress,
|
||||
realname: $scope.realname,
|
||||
@ -83,17 +76,13 @@ var SetCredentialsCtrl = function($scope, $location, $routeParams) {
|
||||
host: $scope.imapHost.toLowerCase(),
|
||||
port: $scope.imapPort,
|
||||
secure: imapEncryption === ENCRYPTION_METHOD_TLS,
|
||||
ignoreTLS: imapEncryption === ENCRYPTION_METHOD_NONE,
|
||||
ca: $scope.imapCert,
|
||||
pinned: !!$scope.imapPinned
|
||||
ignoreTLS: imapEncryption === ENCRYPTION_METHOD_NONE
|
||||
},
|
||||
smtp: {
|
||||
host: $scope.smtpHost.toLowerCase(),
|
||||
port: $scope.smtpPort,
|
||||
secure: smtpEncryption === ENCRYPTION_METHOD_TLS,
|
||||
ignoreTLS: smtpEncryption === ENCRYPTION_METHOD_NONE,
|
||||
ca: $scope.smtpCert,
|
||||
pinned: !!$scope.smtpPinned
|
||||
ignoreTLS: smtpEncryption === ENCRYPTION_METHOD_NONE
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1,9 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
var appCtrl = require('../app-controller'),
|
||||
cfg = require('../app-config').config;
|
||||
var appCtrl = require('../app-controller');
|
||||
|
||||
var ValidatePhoneCtrl = function($scope, $location, $routeParams) {
|
||||
var ValidatePhoneCtrl = function($scope, $location, $routeParams, mailConfig) {
|
||||
if (!appCtrl._auth && !$routeParams.dev) {
|
||||
$location.path('/'); // init app
|
||||
return;
|
||||
@ -36,20 +35,33 @@ var ValidatePhoneCtrl = function($scope, $location, $routeParams) {
|
||||
};
|
||||
|
||||
$scope.login = function() {
|
||||
// store credentials in memory
|
||||
appCtrl._auth.setCredentials({
|
||||
provider: 'wmail',
|
||||
emailAddress: $scope.state.createAccount.emailAddress,
|
||||
username: $scope.state.createAccount.emailAddress,
|
||||
realname: $scope.state.createAccount.realname,
|
||||
password: $scope.state.createAccount.pass,
|
||||
imap: cfg.wmail.imap,
|
||||
smtp: cfg.wmail.smtp
|
||||
});
|
||||
var address = $scope.state.createAccount.emailAddress;
|
||||
return mailConfig.get(address).then(function(config) {
|
||||
// store credentials in memory
|
||||
appCtrl._auth.setCredentials({
|
||||
emailAddress: $scope.state.createAccount.emailAddress,
|
||||
username: $scope.state.createAccount.emailAddress,
|
||||
realname: $scope.state.createAccount.realname,
|
||||
password: $scope.state.createAccount.pass,
|
||||
imap: {
|
||||
host: config.imap.hostname,
|
||||
port: parseInt(config.imap.port, 10),
|
||||
secure: config.imap.secure
|
||||
},
|
||||
smtp: {
|
||||
host: config.smtp.hostname,
|
||||
port: parseInt(config.smtp.port, 10),
|
||||
secure: config.smtp.secure
|
||||
}
|
||||
});
|
||||
|
||||
// proceed to login and keygen
|
||||
$location.path('/login');
|
||||
$scope.$apply();
|
||||
// proceed to login and keygen
|
||||
$location.path('/login');
|
||||
|
||||
}).catch(function() {
|
||||
$scope.busy = false;
|
||||
$scope.errMsg = 'Error fetching IMAP settings!';
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
|
27
src/js/services/mail-config.js
Normal file
27
src/js/services/mail-config.js
Normal file
@ -0,0 +1,27 @@
|
||||
'use strict';
|
||||
|
||||
var cfg = require('../app-config').config;
|
||||
|
||||
var ngModule = angular.module('woServices', []);
|
||||
|
||||
ngModule.service('mailConfig', function($http, $q) {
|
||||
|
||||
/**
|
||||
* Get the mail server IMAP and SMTP configuration for an email address
|
||||
*/
|
||||
this.get = function(emailAddress) {
|
||||
if (emailAddress.indexOf('@') < 0) {
|
||||
return $q(function(resolve, reject) {
|
||||
reject(new Error('Invalid email address!'));
|
||||
});
|
||||
}
|
||||
|
||||
var url = cfg.settingsUrl + emailAddress.split('@')[1];
|
||||
return $http.get(url).then(function(res) {
|
||||
return res.data;
|
||||
});
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
module.exports = ngModule;
|
@ -1,8 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
var config = require('../../app-config').config;
|
||||
|
||||
|
||||
/**
|
||||
* Update handler for transition database version 3 -> 4
|
||||
*
|
||||
@ -20,9 +17,16 @@ function update(options, callback) {
|
||||
REALNAME_DB_KEY = 'realname',
|
||||
POST_UPDATE_DB_VERSION = 4;
|
||||
|
||||
|
||||
var imap = config.gmail.imap,
|
||||
smtp = config.gmail.smtp;
|
||||
var imap = {
|
||||
host: 'imap.gmail.com',
|
||||
port: 993,
|
||||
secure: true
|
||||
},
|
||||
smtp = {
|
||||
host: 'smtp.gmail.com',
|
||||
port: 465,
|
||||
secure: true
|
||||
};
|
||||
|
||||
// load the email address (if existing)
|
||||
loadFromDB(EMAIL_ADDR_DB_KEY, function(err, emailAddress) {
|
||||
|
@ -7,22 +7,21 @@ var mocks = angular.mock,
|
||||
cfg = require('../../src/js/app-config').config;
|
||||
|
||||
describe('Add Account Controller unit test', function() {
|
||||
var scope, location, httpBackend, ctrl, authStub, origAuth;
|
||||
var scope, location, mailConfigMock, ctrl, authStub, origAuth;
|
||||
|
||||
beforeEach(function() {
|
||||
// remember original module to restore later, then replace it
|
||||
origAuth = appController._auth;
|
||||
appController._auth = authStub = sinon.createStubInstance(Auth);
|
||||
|
||||
angular.module('addaccounttest', []);
|
||||
angular.module('addaccounttest', ['woServices']);
|
||||
mocks.module('addaccounttest');
|
||||
mocks.inject(function($controller, $rootScope, $location, $httpBackend) {
|
||||
mocks.inject(function($controller, $rootScope, $location, mailConfig) {
|
||||
location = $location;
|
||||
httpBackend = $httpBackend;
|
||||
mailConfigMock = mailConfig;
|
||||
scope = $rootScope.$new();
|
||||
scope.state = {};
|
||||
scope.form = {};
|
||||
scope.formValidate = {};
|
||||
|
||||
sinon.stub(location, 'path').returns(location);
|
||||
sinon.stub(location, 'search').returns(location);
|
||||
@ -31,7 +30,8 @@ describe('Add Account Controller unit test', function() {
|
||||
ctrl = $controller(AddAccountCtrl, {
|
||||
$location: location,
|
||||
$scope: scope,
|
||||
$routeParams: {}
|
||||
$routeParams: {},
|
||||
mailConfig: mailConfigMock
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -45,15 +45,12 @@ describe('Add Account Controller unit test', function() {
|
||||
if (scope.$apply.restore) {
|
||||
scope.$apply.restore();
|
||||
}
|
||||
|
||||
httpBackend.verifyNoOutstandingExpectation();
|
||||
httpBackend.verifyNoOutstandingRequest();
|
||||
});
|
||||
|
||||
describe('getAccountSettings', function() {
|
||||
var url, connectToGoogleStub, setCredentialsStub, mailConfig;
|
||||
var url, oauthPossibleStub, setCredentialsStub, mailConfigStub, mailConfig;
|
||||
|
||||
beforeEach(function() {
|
||||
beforeEach(inject(function($q) {
|
||||
scope.form.$invalid = false;
|
||||
scope.emailAddress = 'test@example.com';
|
||||
url = cfg.settingsUrl + 'example.com';
|
||||
@ -63,55 +60,54 @@ describe('Add Account Controller unit test', function() {
|
||||
source: 'guess'
|
||||
}
|
||||
};
|
||||
connectToGoogleStub = sinon.stub(scope, 'connectToGoogle');
|
||||
var deferred = $q.defer();
|
||||
mailConfigStub = sinon.stub(mailConfigMock, 'get');
|
||||
mailConfigStub.returns(deferred.promise);
|
||||
deferred.resolve(mailConfig);
|
||||
|
||||
oauthPossibleStub = sinon.stub(scope, 'oauthPossible');
|
||||
setCredentialsStub = sinon.stub(scope, 'setCredentials');
|
||||
});
|
||||
}));
|
||||
|
||||
afterEach(function() {
|
||||
connectToGoogleStub.restore();
|
||||
mailConfigStub.restore();
|
||||
oauthPossibleStub.restore();
|
||||
setCredentialsStub.restore();
|
||||
});
|
||||
|
||||
it('should work for gmail', function() {
|
||||
mailConfig.imap.hostname = 'imap.gmail.com';
|
||||
httpBackend.expectGET(url).respond(mailConfig);
|
||||
it('should work for gmail', inject(function($rootScope) {
|
||||
authStub.useOAuth.returns(true);
|
||||
|
||||
scope.getAccountSettings();
|
||||
httpBackend.flush();
|
||||
$rootScope.$apply();
|
||||
|
||||
expect(connectToGoogleStub.calledOnce).to.be.true;
|
||||
});
|
||||
expect(oauthPossibleStub.calledOnce).to.be.true;
|
||||
}));
|
||||
|
||||
it('should work for guessed domain', function() {
|
||||
httpBackend.expectGET(url).respond(mailConfig);
|
||||
it('should work for other domain', inject(function($rootScope) {
|
||||
authStub.useOAuth.returns(false);
|
||||
|
||||
scope.getAccountSettings();
|
||||
httpBackend.flush();
|
||||
$rootScope.$apply();
|
||||
|
||||
expect(setCredentialsStub.calledWith('custom')).to.be.true;
|
||||
});
|
||||
expect(setCredentialsStub.calledOnce).to.be.true;
|
||||
}));
|
||||
|
||||
it('should work for dns domain', function() {
|
||||
mailConfig.imap.source = 'dns';
|
||||
httpBackend.expectGET(url).respond(mailConfig);
|
||||
it('should fail for mailConfig error', inject(function($q, $rootScope) {
|
||||
authStub.useOAuth.returns(false);
|
||||
|
||||
var deferred = $q.defer();
|
||||
mailConfigStub.returns(deferred.promise);
|
||||
deferred.reject(new Error());
|
||||
|
||||
scope.getAccountSettings();
|
||||
httpBackend.flush();
|
||||
|
||||
expect(setCredentialsStub.calledWith(undefined)).to.be.true;
|
||||
});
|
||||
|
||||
it('should fail with http 500', function() {
|
||||
httpBackend.expectGET(url).respond(500, '');
|
||||
|
||||
scope.getAccountSettings();
|
||||
httpBackend.flush();
|
||||
$rootScope.$apply();
|
||||
|
||||
expect(scope.errMsg).to.exist;
|
||||
});
|
||||
}));
|
||||
});
|
||||
|
||||
describe('connectToGoogle', function() {
|
||||
describe('oauthPossible', function() {
|
||||
var setCredentialsStub;
|
||||
|
||||
beforeEach(function() {
|
||||
@ -123,57 +119,29 @@ describe('Add Account Controller unit test', function() {
|
||||
});
|
||||
|
||||
it('should use oauth', function() {
|
||||
authStub._oauth = {
|
||||
isSupported: function() {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
scope.onError = function(options) {
|
||||
options.callback(true);
|
||||
};
|
||||
authStub.getOAuthToken.yields();
|
||||
|
||||
scope.connectToGoogle();
|
||||
scope.oauthPossible();
|
||||
|
||||
expect(setCredentialsStub.calledWith('gmail')).to.be.true;
|
||||
expect(setCredentialsStub.calledOnce).to.be.true;
|
||||
expect(authStub.getOAuthToken.calledOnce).to.be.true;
|
||||
});
|
||||
|
||||
it('should not use oauth', function() {
|
||||
authStub._oauth = {
|
||||
isSupported: function() {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
scope.onError = function(options) {
|
||||
options.callback(false);
|
||||
};
|
||||
|
||||
scope.connectToGoogle();
|
||||
scope.oauthPossible();
|
||||
|
||||
expect(setCredentialsStub.calledWith('gmail')).to.be.true;
|
||||
expect(authStub.getOAuthToken.called).to.be.false;
|
||||
});
|
||||
|
||||
it('should not use oauth if not supported', function() {
|
||||
authStub._oauth = {
|
||||
isSupported: function() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
scope.connectToGoogle();
|
||||
|
||||
expect(setCredentialsStub.calledWith('gmail')).to.be.true;
|
||||
expect(setCredentialsStub.calledOnce).to.be.true;
|
||||
expect(authStub.getOAuthToken.called).to.be.false;
|
||||
});
|
||||
|
||||
it('should not forward to login when oauth fails', function(done) {
|
||||
authStub._oauth = {
|
||||
isSupported: function() {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
scope.onError = function(options) {
|
||||
scope.onError = function(err) {
|
||||
expect(err).to.exist;
|
||||
@ -185,18 +153,15 @@ describe('Add Account Controller unit test', function() {
|
||||
};
|
||||
authStub.getOAuthToken.yields(new Error());
|
||||
|
||||
scope.connectToGoogle();
|
||||
scope.oauthPossible();
|
||||
});
|
||||
});
|
||||
|
||||
describe('setCredentials', function() {
|
||||
it('should work', function() {
|
||||
scope.setCredentials('gmail');
|
||||
scope.setCredentials();
|
||||
|
||||
expect(location.path.calledWith('/login-set-credentials')).to.be.true;
|
||||
expect(location.search.calledWith({
|
||||
provider: 'gmail'
|
||||
})).to.be.true;
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -11,7 +11,6 @@ describe('Auth unit tests', function() {
|
||||
var USERNAME_DB_KEY = 'username';
|
||||
var REALNAME_DB_KEY = 'realname';
|
||||
var PASSWD_DB_KEY = 'password';
|
||||
var PROVIDER_DB_KEY = 'provider';
|
||||
var IMAP_DB_KEY = 'imap';
|
||||
var SMTP_DB_KEY = 'smtp';
|
||||
// SUT
|
||||
@ -25,7 +24,6 @@ describe('Auth unit tests', function() {
|
||||
var password = 'passwordpasswordpassword';
|
||||
var encryptedPassword = 'pgppasswordpgppassword';
|
||||
var oauthToken = 'tokentokentokentoken';
|
||||
var provider = 'gmail';
|
||||
var realname = 'Bla Blubb';
|
||||
var username = 'bla';
|
||||
var imap = {
|
||||
@ -52,7 +50,6 @@ describe('Auth unit tests', function() {
|
||||
it('should load credentials and retrieve credentials from cfg', function(done) {
|
||||
storageStub.listItems.withArgs(EMAIL_ADDR_DB_KEY, 0, null).yieldsAsync(null, [emailAddress]);
|
||||
storageStub.listItems.withArgs(PASSWD_DB_KEY, 0, null).yieldsAsync(null, [encryptedPassword]);
|
||||
storageStub.listItems.withArgs(PROVIDER_DB_KEY, 0, null).yieldsAsync(null, [provider]);
|
||||
storageStub.listItems.withArgs(USERNAME_DB_KEY, 0, null).yieldsAsync(null, [username]);
|
||||
storageStub.listItems.withArgs(REALNAME_DB_KEY, 0, null).yieldsAsync(null, [realname]);
|
||||
storageStub.listItems.withArgs(IMAP_DB_KEY, 0, null).yieldsAsync(null, [imap]);
|
||||
@ -62,7 +59,6 @@ describe('Auth unit tests', function() {
|
||||
auth.getCredentials(function(err, cred) {
|
||||
expect(err).to.not.exist;
|
||||
|
||||
expect(auth.provider).to.equal(provider);
|
||||
expect(auth.emailAddress).to.equal(emailAddress);
|
||||
expect(auth.password).to.equal(password);
|
||||
|
||||
@ -80,7 +76,7 @@ describe('Auth unit tests', function() {
|
||||
expect(cred.smtp.auth.user).to.equal(username);
|
||||
expect(cred.smtp.auth.pass).to.equal(password);
|
||||
|
||||
expect(storageStub.listItems.callCount).to.equal(7);
|
||||
expect(storageStub.listItems.callCount).to.equal(6);
|
||||
expect(pgpStub.decrypt.calledOnce).to.be.true;
|
||||
|
||||
done();
|
||||
@ -91,7 +87,6 @@ describe('Auth unit tests', function() {
|
||||
describe('#setCredentials', function() {
|
||||
it('should set the credentials', function() {
|
||||
auth.setCredentials({
|
||||
provider: 'albhsvadlbvsdalbsadflb',
|
||||
emailAddress: emailAddress,
|
||||
username: username,
|
||||
realname: realname,
|
||||
@ -100,7 +95,6 @@ describe('Auth unit tests', function() {
|
||||
smtp: smtp
|
||||
});
|
||||
|
||||
expect(auth.provider).to.equal('albhsvadlbvsdalbsadflb');
|
||||
expect(auth.emailAddress).to.equal(emailAddress);
|
||||
expect(auth.username).to.equal(username);
|
||||
expect(auth.realname).to.equal(realname);
|
||||
@ -109,7 +103,6 @@ describe('Auth unit tests', function() {
|
||||
expect(auth.imap).to.equal(imap);
|
||||
expect(auth.credentialsDirty).to.be.true;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('#storeCredentials', function() {
|
||||
@ -121,11 +114,9 @@ describe('Auth unit tests', function() {
|
||||
auth.password = password;
|
||||
auth.smtp = smtp;
|
||||
auth.imap = imap;
|
||||
auth.provider = provider;
|
||||
|
||||
storageStub.storeList.withArgs([encryptedPassword], PASSWD_DB_KEY).yieldsAsync();
|
||||
storageStub.storeList.withArgs([emailAddress], EMAIL_ADDR_DB_KEY).yieldsAsync();
|
||||
storageStub.storeList.withArgs([provider], PROVIDER_DB_KEY).yieldsAsync();
|
||||
storageStub.storeList.withArgs([username], USERNAME_DB_KEY).yieldsAsync();
|
||||
storageStub.storeList.withArgs([realname], REALNAME_DB_KEY).yieldsAsync();
|
||||
storageStub.storeList.withArgs([imap], IMAP_DB_KEY).yieldsAsync();
|
||||
@ -135,7 +126,7 @@ describe('Auth unit tests', function() {
|
||||
auth.storeCredentials(function(err) {
|
||||
expect(err).to.not.exist;
|
||||
|
||||
expect(storageStub.storeList.callCount).to.equal(7);
|
||||
expect(storageStub.storeList.callCount).to.equal(6);
|
||||
expect(pgpStub.encrypt.calledOnce).to.be.true;
|
||||
|
||||
done();
|
||||
@ -143,6 +134,29 @@ describe('Auth unit tests', function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe('#useOAuth', function() {
|
||||
it('should not recommend oauth for unsupported platorm', function() {
|
||||
oauthStub.isSupported.returns(false);
|
||||
|
||||
var res = auth.useOAuth('imap.gmail.com');
|
||||
expect(res).to.be.false;
|
||||
});
|
||||
|
||||
it('should recommend oauth for whitelisted host', function() {
|
||||
oauthStub.isSupported.returns(true);
|
||||
|
||||
var res = auth.useOAuth('imap.gmail.com');
|
||||
expect(res).to.be.true;
|
||||
});
|
||||
|
||||
it('should not recommend oauth for other hosts', function() {
|
||||
oauthStub.isSupported.returns(true);
|
||||
|
||||
var res = auth.useOAuth('imap.ggmail.com');
|
||||
expect(res).to.be.false;
|
||||
});
|
||||
});
|
||||
|
||||
describe('#getOAuthToken', function() {
|
||||
it('should refresh token with known email address', function(done) {
|
||||
auth.emailAddress = emailAddress;
|
||||
@ -231,7 +245,6 @@ describe('Auth unit tests', function() {
|
||||
it('should work', function(done) {
|
||||
storageStub.listItems.withArgs(EMAIL_ADDR_DB_KEY, 0, null).yieldsAsync(null, [emailAddress]);
|
||||
storageStub.listItems.withArgs(PASSWD_DB_KEY, 0, null).yieldsAsync(null, [encryptedPassword]);
|
||||
storageStub.listItems.withArgs(PROVIDER_DB_KEY, 0, null).yieldsAsync(null, [provider]);
|
||||
storageStub.listItems.withArgs(USERNAME_DB_KEY, 0, null).yieldsAsync(null, [username]);
|
||||
storageStub.listItems.withArgs(REALNAME_DB_KEY, 0, null).yieldsAsync(null, [realname]);
|
||||
storageStub.listItems.withArgs(IMAP_DB_KEY, 0, null).yieldsAsync(null, [imap]);
|
||||
@ -241,7 +254,6 @@ describe('Auth unit tests', function() {
|
||||
expect(err).to.not.exist;
|
||||
expect(auth.emailAddress).to.equal(emailAddress);
|
||||
expect(auth.password).to.equal(encryptedPassword);
|
||||
expect(auth.provider).to.equal(provider);
|
||||
expect(auth.imap).to.equal(imap);
|
||||
expect(auth.smtp).to.equal(smtp);
|
||||
expect(auth.username).to.equal(username);
|
||||
@ -249,7 +261,7 @@ describe('Auth unit tests', function() {
|
||||
|
||||
expect(auth.passwordNeedsDecryption).to.be.true;
|
||||
|
||||
expect(storageStub.listItems.callCount).to.equal(7);
|
||||
expect(storageStub.listItems.callCount).to.equal(6);
|
||||
|
||||
done();
|
||||
});
|
||||
@ -262,7 +274,6 @@ describe('Auth unit tests', function() {
|
||||
expect(err).to.exist;
|
||||
expect(auth.emailAddress).to.not.exist;
|
||||
expect(auth.password).to.not.exist;
|
||||
expect(auth.provider).to.not.exist;
|
||||
expect(auth.imap).to.not.exist;
|
||||
expect(auth.smtp).to.not.exist;
|
||||
expect(auth.username).to.not.exist;
|
||||
|
@ -32,8 +32,15 @@ describe('Login (Set Credentials) Controller unit test', function() {
|
||||
location.search({
|
||||
provider: provider
|
||||
});
|
||||
scope.state = {
|
||||
login: {
|
||||
mailConfig: {
|
||||
imap: {},
|
||||
smtp: {}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
scope.state = {};
|
||||
setCredentialsCtrl = $controller(SetCredentialsCtrl, {
|
||||
$scope: scope,
|
||||
$routeParams: {}
|
||||
@ -60,7 +67,6 @@ describe('Login (Set Credentials) Controller unit test', function() {
|
||||
scope.realname = 'peter pan';
|
||||
|
||||
var expectedCredentials = {
|
||||
provider: provider,
|
||||
emailAddress: scope.emailAddress,
|
||||
username: scope.username || scope.emailAddress,
|
||||
realname: scope.realname,
|
||||
@ -70,17 +76,13 @@ describe('Login (Set Credentials) Controller unit test', function() {
|
||||
host: scope.imapHost.toLowerCase(),
|
||||
port: scope.imapPort,
|
||||
secure: true,
|
||||
ignoreTLS: false,
|
||||
ca: undefined,
|
||||
pinned: false
|
||||
ignoreTLS: false
|
||||
},
|
||||
smtp: {
|
||||
host: scope.smtpHost.toLowerCase(),
|
||||
port: scope.smtpPort,
|
||||
secure: false,
|
||||
ignoreTLS: false,
|
||||
ca: undefined,
|
||||
pinned: false
|
||||
ignoreTLS: false
|
||||
}
|
||||
};
|
||||
|
||||
|
56
test/unit/mail-config-service-test.js
Normal file
56
test/unit/mail-config-service-test.js
Normal file
@ -0,0 +1,56 @@
|
||||
'use strict';
|
||||
|
||||
var mocks = angular.mock,
|
||||
cfg = require('../../src/js/app-config').config;
|
||||
require('../../src/js/services/mail-config');
|
||||
|
||||
describe('Mail Config Service unit test', function() {
|
||||
var mailConfig, httpBackend;
|
||||
|
||||
beforeEach(function() {
|
||||
angular.module('mail-config-test', ['woServices']);
|
||||
mocks.module('mail-config-test');
|
||||
mocks.inject(function($injector, $httpBackend) {
|
||||
httpBackend = $httpBackend;
|
||||
mailConfig = $injector.get('mailConfig');
|
||||
});
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
httpBackend.verifyNoOutstandingExpectation();
|
||||
httpBackend.verifyNoOutstandingRequest();
|
||||
});
|
||||
|
||||
describe('get', function() {
|
||||
var url = cfg.settingsUrl + 'example.com',
|
||||
exampleCfg = {
|
||||
imap: {}
|
||||
};
|
||||
|
||||
it('should work', function() {
|
||||
httpBackend.expectGET(url).respond(exampleCfg);
|
||||
|
||||
mailConfig.get('text@example.com').then(function(config) {
|
||||
expect(config.imap).to.exist;
|
||||
});
|
||||
httpBackend.flush();
|
||||
});
|
||||
|
||||
it('should fail for invalid email address', inject(function($rootScope) {
|
||||
mailConfig.get('textexample.com').catch(function(err) {
|
||||
expect(err.message).to.contain('Invalid');
|
||||
});
|
||||
$rootScope.$apply();
|
||||
}));
|
||||
|
||||
it('should fail with http 500', function() {
|
||||
httpBackend.expectGET(url).respond(500, '');
|
||||
|
||||
mailConfig.get('text@example.com').catch(function(err) {
|
||||
expect(err).to.exist;
|
||||
});
|
||||
httpBackend.flush();
|
||||
});
|
||||
});
|
||||
|
||||
});
|
@ -3,8 +3,7 @@
|
||||
var DeviceStorageDAO = require('../../src/js/dao/devicestorage-dao'),
|
||||
Auth = require('../../src/js/bo/auth'),
|
||||
cfg = require('../../src/js/app-config').config,
|
||||
UpdateHandler = require('../../src/js/util/update/update-handler'),
|
||||
config = require('../../src/js/app-config').config;
|
||||
UpdateHandler = require('../../src/js/util/update/update-handler');
|
||||
|
||||
describe('UpdateHandler', function() {
|
||||
var updateHandler, appConfigStorageStub, authStub, userStorageStub, origDbVersion;
|
||||
@ -276,8 +275,16 @@ describe('UpdateHandler', function() {
|
||||
var REALNAME_DB_KEY = 'realname';
|
||||
var emailaddress = 'bla@blubb.io';
|
||||
|
||||
var imap = config.gmail.imap,
|
||||
smtp = config.gmail.smtp;
|
||||
var imap = {
|
||||
host: 'imap.gmail.com',
|
||||
port: 993,
|
||||
secure: true
|
||||
},
|
||||
smtp = {
|
||||
host: 'smtp.gmail.com',
|
||||
port: 465,
|
||||
secure: true
|
||||
};
|
||||
|
||||
beforeEach(function() {
|
||||
cfg.dbVersion = 4; // app requires database version 4
|
||||
|
@ -5,9 +5,10 @@ var mocks = angular.mock,
|
||||
Auth = require('../../src/js/bo/auth'),
|
||||
AdminDao = require('../../src/js/dao/admin-dao'),
|
||||
appController = require('../../src/js/app-controller');
|
||||
require('../../src/js/services/mail-config');
|
||||
|
||||
describe('Validate Phone Controller unit test', function() {
|
||||
var scope, location, ctrl, authStub, origAuth, adminStub;
|
||||
var scope, location, mailConfigMock, ctrl, authStub, origAuth, adminStub;
|
||||
|
||||
beforeEach(function() {
|
||||
// remember original module to restore later, then replace it
|
||||
@ -15,14 +16,15 @@ describe('Validate Phone Controller unit test', function() {
|
||||
appController._auth = authStub = sinon.createStubInstance(Auth);
|
||||
appController._adminDao = adminStub = sinon.createStubInstance(AdminDao);
|
||||
|
||||
angular.module('validatephonetest', []);
|
||||
angular.module('validatephonetest', ['woServices']);
|
||||
mocks.module('validatephonetest');
|
||||
mocks.inject(function($controller, $rootScope, $location) {
|
||||
mocks.inject(function($controller, $rootScope, $location, mailConfig) {
|
||||
location = $location;
|
||||
mailConfigMock = mailConfig;
|
||||
scope = $rootScope.$new();
|
||||
scope.state = {
|
||||
createAccount: {
|
||||
emailAddress: 'test@example.com',
|
||||
emailAddress: 'test@wmail.io',
|
||||
pass: 'asdf',
|
||||
realname: 'Test User'
|
||||
}
|
||||
@ -36,7 +38,8 @@ describe('Validate Phone Controller unit test', function() {
|
||||
ctrl = $controller(ValidatePhoneCtrl, {
|
||||
$location: location,
|
||||
$scope: scope,
|
||||
$routeParams: {}
|
||||
$routeParams: {},
|
||||
mailConfig: mailConfigMock
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -93,14 +96,24 @@ describe('Validate Phone Controller unit test', function() {
|
||||
});
|
||||
|
||||
describe('login', function() {
|
||||
it('should work', function() {
|
||||
it('should work', inject(function($q, $rootScope) {
|
||||
scope.form.$invalid = false;
|
||||
authStub.setCredentials.returns();
|
||||
|
||||
var deferred = $q.defer();
|
||||
sinon.stub(mailConfigMock, 'get').returns(deferred.promise);
|
||||
deferred.resolve({
|
||||
imap: {},
|
||||
smtp: {}
|
||||
});
|
||||
|
||||
scope.login();
|
||||
|
||||
$rootScope.$apply();
|
||||
expect(mailConfigMock.get.calledOnce).to.be.true;
|
||||
expect(authStub.setCredentials.calledOnce).to.be.true;
|
||||
expect(location.path.calledWith('/login')).to.be.true;
|
||||
});
|
||||
}));
|
||||
});
|
||||
|
||||
});
|
Loading…
Reference in New Issue
Block a user