mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
support for prelogin kdf info
This commit is contained in:
7
src/models/request/preloginRequest.ts
Normal file
7
src/models/request/preloginRequest.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export class PreloginRequest {
|
||||
email: string;
|
||||
|
||||
constructor(email: string) {
|
||||
this.email = email;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
import { KeysRequest } from './keysRequest';
|
||||
|
||||
import { KdfType } from '../../enums/kdfType';
|
||||
|
||||
export class RegisterRequest {
|
||||
name: string;
|
||||
email: string;
|
||||
@@ -9,12 +11,17 @@ export class RegisterRequest {
|
||||
keys: KeysRequest;
|
||||
token: string;
|
||||
organizationUserId: string;
|
||||
kdf: KdfType;
|
||||
kdfIterations: number;
|
||||
|
||||
constructor(email: string, name: string, masterPasswordHash: string, masterPasswordHint: string, key: string) {
|
||||
constructor(email: string, name: string, masterPasswordHash: string, masterPasswordHint: string, key: string,
|
||||
kdf: KdfType, kdfIterations: number) {
|
||||
this.name = name;
|
||||
this.email = email;
|
||||
this.masterPasswordHash = masterPasswordHash;
|
||||
this.masterPasswordHint = masterPasswordHint ? masterPasswordHint : null;
|
||||
this.key = key;
|
||||
this.kdf = kdf;
|
||||
this.kdfIterations = kdfIterations;
|
||||
}
|
||||
}
|
||||
|
||||
11
src/models/response/preloginResponse.ts
Normal file
11
src/models/response/preloginResponse.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { KdfType } from '../../enums/kdfType';
|
||||
|
||||
export class PreloginResponse {
|
||||
kdf: KdfType;
|
||||
kdfIterations: number;
|
||||
|
||||
constructor(response: any) {
|
||||
this.kdf = response.Kdf;
|
||||
this.kdfIterations = response.KdfIterations;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user