1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 18:23:31 +00:00

generate keypair on registration

This commit is contained in:
Kyle Spearrin
2018-07-03 11:41:55 -04:00
parent 269b59210c
commit 3454d93fef
10 changed files with 127 additions and 22 deletions

View File

@@ -4,12 +4,25 @@ export class RegisterRequest {
masterPasswordHash: string;
masterPasswordHint: string;
key: string;
keys: RegisterKeysRequest;
token: string;
organizationUserId: string;
constructor(email: string, masterPasswordHash: string, masterPasswordHint: string, key: string) {
this.name = null;
constructor(email: string, name: string, masterPasswordHash: string, masterPasswordHint: string, key: string) {
this.name = name;
this.email = email;
this.masterPasswordHash = masterPasswordHash;
this.masterPasswordHint = masterPasswordHint ? masterPasswordHint : null;
this.key = key;
}
}
export class RegisterKeysRequest {
publicKey: string;
encryptedPrivateKey: string;
constructor(publicKey: string, encryptedPrivateKey: string) {
this.publicKey = publicKey;
this.encryptedPrivateKey = encryptedPrivateKey;
}
}