mirror of
https://github.com/bitwarden/browser
synced 2026-02-08 20:50:28 +00:00
[PM-27086] rename old methods
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { OrganizationUserApiService } from "@bitwarden/admin-console/common";
|
||||
import { DefaultSetInitialPasswordService } from "@bitwarden/angular/auth/password-management/set-initial-password/default-set-initial-password.service.implementation";
|
||||
import {
|
||||
SetInitialPasswordCredentials,
|
||||
SetInitialPasswordCredentialsOld,
|
||||
SetInitialPasswordCredentialsV2,
|
||||
SetInitialPasswordService,
|
||||
SetInitialPasswordUserType,
|
||||
@@ -54,12 +54,12 @@ export class DesktopSetInitialPasswordService
|
||||
/**
|
||||
* @deprecated To be removed in PM-28143
|
||||
*/
|
||||
override async setInitialPassword(
|
||||
credentials: SetInitialPasswordCredentials,
|
||||
override async setInitialPasswordOld(
|
||||
credentials: SetInitialPasswordCredentialsOld,
|
||||
userType: SetInitialPasswordUserType,
|
||||
userId: UserId,
|
||||
) {
|
||||
await super.setInitialPassword(credentials, userType, userId);
|
||||
await super.setInitialPasswordOld(credentials, userType, userId);
|
||||
|
||||
this.messagingService.send("redrawMenu");
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { OrganizationUserApiService } from "@bitwarden/admin-console/common";
|
||||
import { DefaultSetInitialPasswordService } from "@bitwarden/angular/auth/password-management/set-initial-password/default-set-initial-password.service.implementation";
|
||||
import {
|
||||
SetInitialPasswordCredentials,
|
||||
SetInitialPasswordCredentialsOld,
|
||||
SetInitialPasswordCredentialsV2,
|
||||
SetInitialPasswordService,
|
||||
SetInitialPasswordUserType,
|
||||
@@ -56,12 +56,12 @@ export class WebSetInitialPasswordService
|
||||
/**
|
||||
* @deprecated To be removed in PM-28143
|
||||
*/
|
||||
override async setInitialPassword(
|
||||
credentials: SetInitialPasswordCredentials,
|
||||
override async setInitialPasswordOld(
|
||||
credentials: SetInitialPasswordCredentialsOld,
|
||||
userType: SetInitialPasswordUserType,
|
||||
userId: UserId,
|
||||
) {
|
||||
await super.setInitialPassword(credentials, userType, userId);
|
||||
await super.setInitialPasswordOld(credentials, userType, userId);
|
||||
|
||||
/**
|
||||
* TODO: Investigate refactoring the following logic in https://bitwarden.atlassian.net/browse/PM-22615
|
||||
|
||||
@@ -36,7 +36,7 @@ import { PureCrypto } from "@bitwarden/sdk-internal";
|
||||
|
||||
import {
|
||||
SetInitialPasswordService,
|
||||
SetInitialPasswordCredentials,
|
||||
SetInitialPasswordCredentialsOld,
|
||||
SetInitialPasswordUserType,
|
||||
SetInitialPasswordTdeOffboardingCredentials,
|
||||
SetInitialPasswordCredentialsV2,
|
||||
@@ -60,8 +60,8 @@ export class DefaultSetInitialPasswordService implements SetInitialPasswordServi
|
||||
/**
|
||||
* @deprecated To be removed in PM-28143
|
||||
*/
|
||||
async setInitialPassword(
|
||||
credentials: SetInitialPasswordCredentials,
|
||||
async setInitialPasswordOld(
|
||||
credentials: SetInitialPasswordCredentialsOld,
|
||||
userType: SetInitialPasswordUserType,
|
||||
userId: UserId,
|
||||
): Promise<void> {
|
||||
@@ -162,7 +162,7 @@ export class DefaultSetInitialPasswordService implements SetInitialPasswordServi
|
||||
await this.masterPasswordService.setForceSetPasswordReason(ForceSetPasswordReason.None, userId);
|
||||
|
||||
// User now has a password so update account decryption options in state
|
||||
await this.updateAccountDecryptionProperties(
|
||||
await this.updateAccountDecryptionPropertiesOld(
|
||||
newMasterKey,
|
||||
kdfConfig,
|
||||
masterKeyEncryptedUserKey,
|
||||
@@ -366,7 +366,7 @@ export class DefaultSetInitialPasswordService implements SetInitialPasswordServi
|
||||
/**
|
||||
* @deprecated To be removed in PM-28143
|
||||
*/
|
||||
private async updateAccountDecryptionProperties(
|
||||
private async updateAccountDecryptionPropertiesOld(
|
||||
masterKey: MasterKey,
|
||||
kdfConfig: KdfConfig,
|
||||
masterKeyEncryptedUserKey: [UserKey, EncString],
|
||||
|
||||
@@ -23,7 +23,6 @@ import { SsoLoginServiceAbstraction } from "@bitwarden/common/auth/abstractions/
|
||||
import { ForceSetPasswordReason } from "@bitwarden/common/auth/models/domain/force-set-password-reason";
|
||||
import { assertTruthy, assertNonNullish } from "@bitwarden/common/auth/utils";
|
||||
import { InternalMasterPasswordServiceAbstraction } from "@bitwarden/common/key-management/master-password/abstractions/master-password.service.abstraction";
|
||||
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
|
||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
|
||||
@@ -40,7 +39,7 @@ import {
|
||||
import { I18nPipe } from "@bitwarden/ui-common";
|
||||
|
||||
import {
|
||||
SetInitialPasswordCredentials,
|
||||
SetInitialPasswordCredentialsOld,
|
||||
SetInitialPasswordCredentialsV2,
|
||||
SetInitialPasswordService,
|
||||
SetInitialPasswordTdeOffboardingCredentials,
|
||||
@@ -73,7 +72,6 @@ export class SetInitialPasswordComponent implements OnInit {
|
||||
private accountService: AccountService,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private anonLayoutWrapperDataService: AnonLayoutWrapperDataService,
|
||||
private configService: ConfigService,
|
||||
private dialogService: DialogService,
|
||||
private i18nService: I18nService,
|
||||
private logoutService: LogoutService,
|
||||
@@ -204,7 +202,7 @@ export class SetInitialPasswordComponent implements OnInit {
|
||||
return;
|
||||
}
|
||||
|
||||
await this.setInitialPassword(passwordInputResult);
|
||||
await this.setInitialPasswordOld(passwordInputResult);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -222,7 +220,7 @@ export class SetInitialPasswordComponent implements OnInit {
|
||||
/**
|
||||
* @deprecated To be removed in PM-28143
|
||||
*/
|
||||
private async setInitialPassword(passwordInputResult: PasswordInputResult) {
|
||||
private async setInitialPasswordOld(passwordInputResult: PasswordInputResult) {
|
||||
const ctx = "Could not set initial password.";
|
||||
assertTruthy(passwordInputResult.newMasterKey, "newMasterKey", ctx);
|
||||
assertTruthy(passwordInputResult.newServerMasterKeyHash, "newServerMasterKeyHash", ctx);
|
||||
@@ -238,7 +236,7 @@ export class SetInitialPasswordComponent implements OnInit {
|
||||
assertNonNullish(this.resetPasswordAutoEnroll, "resetPasswordAutoEnroll", ctx); // can have `false` as a valid value, so check non-nullish
|
||||
|
||||
try {
|
||||
const credentials: SetInitialPasswordCredentials = {
|
||||
const credentials: SetInitialPasswordCredentialsOld = {
|
||||
newMasterKey: passwordInputResult.newMasterKey,
|
||||
newServerMasterKeyHash: passwordInputResult.newServerMasterKeyHash,
|
||||
newLocalMasterKeyHash: passwordInputResult.newLocalMasterKeyHash,
|
||||
@@ -251,7 +249,7 @@ export class SetInitialPasswordComponent implements OnInit {
|
||||
salt: passwordInputResult.salt,
|
||||
};
|
||||
|
||||
await this.setInitialPasswordService.setInitialPassword(
|
||||
await this.setInitialPasswordService.setInitialPasswordOld(
|
||||
credentials,
|
||||
this.userType,
|
||||
this.userId,
|
||||
|
||||
@@ -45,7 +45,7 @@ export const SetInitialPasswordUserType: Readonly<{
|
||||
/**
|
||||
* @deprecated To be removed in PM-28143
|
||||
*/
|
||||
export interface SetInitialPasswordCredentials {
|
||||
export interface SetInitialPasswordCredentialsOld {
|
||||
newMasterKey: MasterKey;
|
||||
newServerMasterKeyHash: string;
|
||||
newLocalMasterKeyHash: string;
|
||||
@@ -90,8 +90,8 @@ export abstract class SetInitialPasswordService {
|
||||
* @throws If any property on the `credentials` object is null or undefined, or if a
|
||||
* masterKeyEncryptedUserKey or newKeyPair could not be created.
|
||||
*/
|
||||
abstract setInitialPassword: (
|
||||
credentials: SetInitialPasswordCredentials,
|
||||
abstract setInitialPasswordOld: (
|
||||
credentials: SetInitialPasswordCredentialsOld,
|
||||
userType: SetInitialPasswordUserType,
|
||||
userId: UserId,
|
||||
) => Promise<void>;
|
||||
|
||||
@@ -16,7 +16,7 @@ export interface PasswordInputResult {
|
||||
*
|
||||
* To be removed in PM-28143
|
||||
*/
|
||||
newApisFlagEnabled: boolean;
|
||||
newApisFlagEnabled?: boolean;
|
||||
|
||||
// The deprecated properties below will be removed in PM-28143: https://bitwarden.atlassian.net/browse/PM-28143
|
||||
|
||||
|
||||
Reference in New Issue
Block a user