mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1202342 - Expose getAssertions to the System app. r=spenrose
This commit is contained in:
parent
3c4ae9a668
commit
f40a554edc
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user