Bug 1202342 - Expose getAssertions to the System app. r=spenrose

This commit is contained in:
Fernando Jimenez 2015-09-08 09:07:20 +02:00
parent 3c4ae9a668
commit f40a554edc

View File

@ -93,12 +93,23 @@ this.FxAccountsMgmtService = {
delete data.accountId;
}
// XXX dirty hack because Gaia is sending getAccounts.
// Bug 1202450 dirty hack because Gaia is sending getAccounts.
if (data.method == "getAccounts") {
data.method = "getAccount";
}
switch(data.method) {
case "getAssertion":
let principal = Services.scriptSecurityManager.getSystemPrincipal();
let audience = msg.audience || principal.originNoSuffix;
FxAccountsManager.getAssertion(audience, principal, {
silent: msg.silent || false
}).then(result => {
self._onFulfill(msg.id, result);
}, reason => {
self._onReject(msg.id, reason);
});
break;
case "getAccount":
case "getKeys":
FxAccountsManager[data.method]().then(