mirror of
https://github.com/bitwarden/cli
synced 2025-12-06 04:23:19 +00:00
EC-134 Fix api token refresh (#517)
* Update dependencies * Update jslib
This commit is contained in:
2
jslib
2
jslib
Submodule jslib updated: 15ad2ca3ea...e595c0548e
17
src/bw.ts
17
src/bw.ts
@@ -10,7 +10,6 @@ import { LogLevelType } from "jslib-common/enums/logLevelType";
|
|||||||
import { StateFactory } from "jslib-common/factories/stateFactory";
|
import { StateFactory } from "jslib-common/factories/stateFactory";
|
||||||
import { Account } from "jslib-common/models/domain/account";
|
import { Account } from "jslib-common/models/domain/account";
|
||||||
import { GlobalState } from "jslib-common/models/domain/globalState";
|
import { GlobalState } from "jslib-common/models/domain/globalState";
|
||||||
import { ApiLogInCredentials } from "jslib-common/models/domain/logInCredentials";
|
|
||||||
import { AppIdService } from "jslib-common/services/appId.service";
|
import { AppIdService } from "jslib-common/services/appId.service";
|
||||||
import { AuditService } from "jslib-common/services/audit.service";
|
import { AuditService } from "jslib-common/services/audit.service";
|
||||||
import { AuthService } from "jslib-common/services/auth.service";
|
import { AuthService } from "jslib-common/services/auth.service";
|
||||||
@@ -155,18 +154,20 @@ export class Main {
|
|||||||
this.tokenService = new TokenService(this.stateService);
|
this.tokenService = new TokenService(this.stateService);
|
||||||
this.messagingService = new NoopMessagingService();
|
this.messagingService = new NoopMessagingService();
|
||||||
this.environmentService = new EnvironmentService(this.stateService);
|
this.environmentService = new EnvironmentService(this.stateService);
|
||||||
|
|
||||||
|
const customUserAgent =
|
||||||
|
"Bitwarden_CLI/" +
|
||||||
|
this.platformUtilsService.getApplicationVersionSync() +
|
||||||
|
" (" +
|
||||||
|
this.platformUtilsService.getDeviceString().toUpperCase() +
|
||||||
|
")";
|
||||||
this.apiService = new NodeApiService(
|
this.apiService = new NodeApiService(
|
||||||
this.tokenService,
|
this.tokenService,
|
||||||
this.platformUtilsService,
|
this.platformUtilsService,
|
||||||
this.environmentService,
|
this.environmentService,
|
||||||
|
this.appIdService,
|
||||||
async (expired: boolean) => await this.logout(),
|
async (expired: boolean) => await this.logout(),
|
||||||
"Bitwarden_CLI/" +
|
customUserAgent
|
||||||
this.platformUtilsService.getApplicationVersionSync() +
|
|
||||||
" (" +
|
|
||||||
this.platformUtilsService.getDeviceString().toUpperCase() +
|
|
||||||
")",
|
|
||||||
(clientId, clientSecret) =>
|
|
||||||
this.authService.logIn(new ApiLogInCredentials(clientId, clientSecret))
|
|
||||||
);
|
);
|
||||||
this.containerService = new ContainerService(this.cryptoService);
|
this.containerService = new ContainerService(this.cryptoService);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user