Added clearAuthInfo()

This commit is contained in:
Adhiraj
2020-07-30 13:19:47 +05:30
parent dabe8a1974
commit 0a4135ea7a

View File

@@ -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