1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-26 09:33:22 +00:00

[PM-27086 TDE Offboarding] Use new KM APIs; create new methods

This commit is contained in:
rr-bw
2026-01-04 21:12:45 -08:00
parent 4593017377
commit 0929b1b276
4 changed files with 133 additions and 2 deletions

View File

@@ -3,7 +3,28 @@
// This import has been flagged as unallowed for this class. It may be involved in a circular dependency loop.
// eslint-disable-next-line no-restricted-imports
import { OrganizationUserResetPasswordRequest } from "@bitwarden/admin-console/common";
import {
MasterPasswordAuthenticationData,
MasterPasswordUnlockData,
} from "@bitwarden/common/key-management/master-password/types/master-password.types";
export class UpdateTdeOffboardingPasswordRequest extends OrganizationUserResetPasswordRequest {
masterPasswordHint: string;
// This will eventually be changed to be an actual constructor, once all callers are updated.
// The body of this request will be changed to carry the authentication data and unlock data.
// https://bitwarden.atlassian.net/browse/PM-23234
static newConstructorWithHint(
authenticationData: MasterPasswordAuthenticationData,
unlockData: MasterPasswordUnlockData,
masterPasswordHint: string,
): UpdateTdeOffboardingPasswordRequest {
const request = OrganizationUserResetPasswordRequest.newConstructor(
authenticationData,
unlockData,
) as UpdateTdeOffboardingPasswordRequest;
request.masterPasswordHint = masterPasswordHint;
return request;
}
}