mirror of
https://github.com/moparisthebest/mail
synced 2024-11-15 05:35:05 -05:00
Add key server url to grunt build config
This commit is contained in:
parent
636e6ffad9
commit
493c13eac6
@ -295,7 +295,8 @@ module.exports = function(grunt) {
|
|||||||
suffix: ' (Beta)',
|
suffix: ' (Beta)',
|
||||||
version: version,
|
version: version,
|
||||||
deleteKey: true,
|
deleteKey: true,
|
||||||
keyServer: 'https://keys.whiteout.io/'
|
keyServer: 'https://keys.whiteout.io/',
|
||||||
|
keychainServer: 'https://keychain.whiteout.io/'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -317,6 +318,10 @@ module.exports = function(grunt) {
|
|||||||
var ksIndex = manifest.permissions.indexOf('https://keys-test.whiteout.io/');
|
var ksIndex = manifest.permissions.indexOf('https://keys-test.whiteout.io/');
|
||||||
manifest.permissions[ksIndex] = options.keyServer;
|
manifest.permissions[ksIndex] = options.keyServer;
|
||||||
}
|
}
|
||||||
|
if (options.keychainServer) {
|
||||||
|
var kcsIndex = manifest.permissions.indexOf('https://keychain-test.whiteout.io/');
|
||||||
|
manifest.permissions[kcsIndex] = options.keychainServer;
|
||||||
|
}
|
||||||
if (options.deleteKey) {
|
if (options.deleteKey) {
|
||||||
delete manifest.key;
|
delete manifest.key;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ define(function(require) {
|
|||||||
|
|
||||||
var _ = require('underscore'),
|
var _ = require('underscore'),
|
||||||
app = {},
|
app = {},
|
||||||
appVersion, cloudUrl, clientId;
|
appVersion, cloudUrl, keychainUrl, clientId;
|
||||||
|
|
||||||
// parse manifest to get configurations for current runtime
|
// parse manifest to get configurations for current runtime
|
||||||
try {
|
try {
|
||||||
@ -14,6 +14,12 @@ define(function(require) {
|
|||||||
});
|
});
|
||||||
// remove last '/' from url due to required syntax in manifest
|
// remove last '/' from url due to required syntax in manifest
|
||||||
cloudUrl = cloudUrl.substring(0, cloudUrl.length - 1);
|
cloudUrl = cloudUrl.substring(0, cloudUrl.length - 1);
|
||||||
|
// get keychain server base url
|
||||||
|
keychainUrl = _.find(manifest.permissions, function(permission) {
|
||||||
|
return typeof permission === 'string' && permission.indexOf('https://keychain') === 0;
|
||||||
|
});
|
||||||
|
// remove last '/' from url due to required syntax in manifest
|
||||||
|
keychainUrl = keychainUrl.substring(0, keychainUrl.length - 1);
|
||||||
// get client ID for OAuth requests
|
// get client ID for OAuth requests
|
||||||
clientId = manifest.oauth2.client_id;
|
clientId = manifest.oauth2.client_id;
|
||||||
// get the app version
|
// get the app version
|
||||||
@ -25,7 +31,7 @@ define(function(require) {
|
|||||||
*/
|
*/
|
||||||
app.config = {
|
app.config = {
|
||||||
cloudUrl: cloudUrl || 'https://keys.whiteout.io',
|
cloudUrl: cloudUrl || 'https://keys.whiteout.io',
|
||||||
privkeyServerUrl: 'https://keychain-test.whiteout.io',
|
privkeyServerUrl: keychainUrl || 'https://keychain.whiteout.io',
|
||||||
serverPrivateKeyId: 'EE342F0DDBB0F3BE',
|
serverPrivateKeyId: 'EE342F0DDBB0F3BE',
|
||||||
symKeySize: 256,
|
symKeySize: 256,
|
||||||
symIvSize: 96,
|
symIvSize: 96,
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
},
|
},
|
||||||
"notifications",
|
"notifications",
|
||||||
"https://keys-test.whiteout.io/",
|
"https://keys-test.whiteout.io/",
|
||||||
|
"https://keychain-test.whiteout.io/",
|
||||||
"https://www.googleapis.com/",
|
"https://www.googleapis.com/",
|
||||||
"identity", {
|
"identity", {
|
||||||
"socket": [
|
"socket": [
|
||||||
|
Loading…
Reference in New Issue
Block a user