summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--app/lib/ipc-facade.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/lib/ipc-facade.js b/app/lib/ipc-facade.js
index 29c369dd9b..246c864ad0 100644
--- a/app/lib/ipc-facade.js
+++ b/app/lib/ipc-facade.js
@@ -34,6 +34,7 @@ export type RelayEndpoint = {
export interface IpcFacade {
setConnectionString(string): void,
+ authenticate(string): Promise<void>,
getAccountData(AccountToken): Promise<AccountData>,
getAccount(): Promise<?AccountToken>,
setAccount(accountToken: ?AccountToken): Promise<void>,
@@ -58,6 +59,11 @@ export class RealIpc implements IpcFacade {
this._ipc.setConnectionString(str);
}
+ authenticate(sharedSecret: string): Promise<void> {
+ return this._ipc.send('auth', sharedSecret)
+ .then(this._ignoreResponse);
+ }
+
getAccountData(accountToken: AccountToken): Promise<AccountData> {
// send the IPC with 30s timeout since the backend will wait
// for a HTTP request before replying