diff options
| author | Erik Larkö <erik@mullvad.net> | 2017-10-16 11:22:39 +0200 |
|---|---|---|
| committer | Erik Larkö <erik@mullvad.net> | 2017-10-16 11:22:39 +0200 |
| commit | 5c70a74bd6fd94d6c1a71b327d02012e85198aeb (patch) | |
| tree | 71a59da8aedaa09c15d5c9e34e4cdc55c72ba8ed | |
| parent | 992f7946dbe9004d88a331b97ea9e030701599ea (diff) | |
| download | mullvadvpn-5c70a74bd6fd94d6c1a71b327d02012e85198aeb.tar.xz mullvadvpn-5c70a74bd6fd94d6c1a71b327d02012e85198aeb.zip | |
rename auth -> authentication
| -rw-r--r-- | app/lib/backend.js | 2 | ||||
| -rw-r--r-- | app/lib/ipc-facade.js | 4 | ||||
| -rw-r--r-- | test/auth.spec.js | 4 | ||||
| -rw-r--r-- | test/mocks/ipc.js | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/app/lib/backend.js b/app/lib/backend.js index 2e4cc90cc7..b7f3f3e489 100644 --- a/app/lib/backend.js +++ b/app/lib/backend.js @@ -372,7 +372,7 @@ export class Backend { } _authenticate(sharedSecret: string): Promise<void> { - return this._ipc.auth(sharedSecret) + return this._ipc.authenticate(sharedSecret) .then(() => { log.info('Authenticated with backend'); }) diff --git a/app/lib/ipc-facade.js b/app/lib/ipc-facade.js index 2d63f4b9ba..4039d44ee9 100644 --- a/app/lib/ipc-facade.js +++ b/app/lib/ipc-facade.js @@ -45,7 +45,7 @@ export interface IpcFacade { getState(): Promise<BackendState>, registerStateListener((BackendState) => void): void, setCloseConnectionHandler(() => void): void, - auth(sharedSecret: string): Promise<void>, + authenticate(sharedSecret: string): Promise<void>, } export class RealIpc implements IpcFacade { @@ -166,7 +166,7 @@ export class RealIpc implements IpcFacade { }); } - auth(sharedSecret: string): Promise<void> { + authenticate(sharedSecret: string): Promise<void> { return this._ipc.send('auth', sharedSecret) .then(this._ignoreResponse); } diff --git a/test/auth.spec.js b/test/auth.spec.js index 6bb23a7136..c3fd78c83d 100644 --- a/test/auth.spec.js +++ b/test/auth.spec.js @@ -16,7 +16,7 @@ describe('authentication', () => { const chain = new IpcChain(mockIpc); - chain.require('auth') + chain.require('authenticate') .withInputValidation( secret => { expect(secret).to.equal(credentials.sharedSecret); }) @@ -36,7 +36,7 @@ describe('authentication', () => { const { mockIpc, backend } = setupBackendAndStore(); let authCount = 0; - mockIpc.auth = () => { + mockIpc.authenticate = () => { authCount++; return Promise.resolve(); }; diff --git a/test/mocks/ipc.js b/test/mocks/ipc.js index 2672a431fd..5b337ebbc9 100644 --- a/test/mocks/ipc.js +++ b/test/mocks/ipc.js @@ -7,7 +7,7 @@ interface MockIpc { -getAccountData: *; -connect: *; -getAccount: *; - -auth: *; + -authenticate: *; } export function newMockIpc() { @@ -63,7 +63,7 @@ export function newMockIpc() { l(state); } }, - auth: (_secret: string) => Promise.resolve(), + authenticate: (_secret: string) => Promise.resolve(), setCloseConnectionHandler: (listener: () => void) => { connectionCloseListeners.push(listener); }, |
