1
0
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:
Kyle Spearrin
2018-08-14 15:12:10 -04:00
parent a7bbdf9c93
commit 9f26f9f377
15 changed files with 140 additions and 31 deletions

View File

@@ -0,0 +1,7 @@
export class PreloginRequest {
email: string;
constructor(email: string) {
this.email = email;
}
}

View File

@@ -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;
}
}

View 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;
}
}