diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2017-10-11 11:24:01 +0200 |
|---|---|---|
| committer | Erik Larkö <erik@mullvad.net> | 2017-10-12 16:13:00 +0200 |
| commit | 3f2942a9a1ce1733428d72ca0e65aea2a06aca0d (patch) | |
| tree | 755fcc721bf36cb31c7d16417c5d3fe70172d31f /app/lib | |
| parent | fa39927850f5147545afe42e2560c0ce094092f6 (diff) | |
| download | mullvadvpn-3f2942a9a1ce1733428d72ca0e65aea2a06aca0d.tar.xz mullvadvpn-3f2942a9a1ce1733428d72ca0e65aea2a06aca0d.zip | |
Add auth call to IPC
Diffstat (limited to 'app/lib')
| -rw-r--r-- | app/lib/ipc-facade.js | 6 |
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 |
