Skip to content

Commit 92eb197

Browse files
authored
allow set of session token and reset token on logout (#71)
* allow set of session token and reset token on logout * update package
1 parent 0d5046e commit 92eb197

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

keeperapi/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@keeper-security/keeperapi",
33
"description": "Keeper API Javascript SDK",
4-
"version": "16.0.71",
4+
"version": "16.0.72",
55
"browser": "dist/index.es.js",
66
"main": "dist/index.cjs.js",
77
"types": "dist/node/index.d.ts",

keeperapi/src/auth.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ export class Auth {
134134
public clientKey?: Uint8Array;
135135
private _accountSummary?: IAccountSummaryElements;
136136
private _accountSummaryVersion: number = 1
137+
137138

138139
constructor(options: ClientConfiguration) {
139140
if (options.deviceConfig && options.deviceToken) {
@@ -234,6 +235,7 @@ export class Auth {
234235
platform.unloadKeys()
235236
await this.executeRestAction(logoutV3Message())
236237
await this.idpLogout()
238+
this._sessionToken = ''
237239
}
238240

239241
async connect() {
@@ -1040,6 +1042,10 @@ export class Auth {
10401042
this._accountSummaryVersion = version
10411043
}
10421044

1045+
public setSessionToken(token: string) {
1046+
this._sessionToken = token
1047+
}
1048+
10431049
// async executeCommand<Command extends KeeperCommand>(command: Command): Promise<Command["response"]> {
10441050
// if (!command.username) {
10451051
// command.username = this._username;

0 commit comments

Comments
 (0)