From 0a4135ea7abb4bc915040b357078f0fb67e6d5ae Mon Sep 17 00:00:00 2001 From: Adhiraj Date: Thu, 30 Jul 2020 13:19:47 +0530 Subject: [PATCH] Added clearAuthInfo() --- src/WAConnection/Base.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/WAConnection/Base.ts b/src/WAConnection/Base.ts index 499d4b9..bda21a8 100644 --- a/src/WAConnection/Base.ts +++ b/src/WAConnection/Base.ts @@ -90,6 +90,18 @@ export default class WAConnectionBase { macKey: this.authInfo.macKey.toString('base64'), } } + /** + * Clear authentication info so a new connection can be created + */ + clearAuthInfo () { + this.authInfo = { + clientID: null, + serverToken: null, + clientToken: null, + encKey: null, + macKey: null, + } + } /** * Load in the authentication credentials * @param authInfo the authentication credentials or path to auth credentials JSON