1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

Enforce Password Generator Policy (#75)

* Enforce Password Generator Policy

* Move policy enforcement to service layer

* Fixed typo (vscode didn't warn..) and adjust import spacing

* Made requested changes
This commit is contained in:
Vincent Salucci
2020-02-26 16:38:11 -06:00
committed by GitHub
parent 29635bf9da
commit 862057dca6
4 changed files with 132 additions and 5 deletions

View File

@@ -1,9 +1,11 @@
import { GeneratedPasswordHistory } from '../models/domain/generatedPasswordHistory';
import { PasswordGeneratorPolicyOptions } from '../models/domain/passwordGeneratorPolicyOptions';
export abstract class PasswordGenerationService {
generatePassword: (options: any) => Promise<string>;
generatePassphrase: (options: any) => Promise<string>;
getOptions: () => any;
getOptions: () => Promise<[any, PasswordGeneratorPolicyOptions]>;
getPasswordGeneratorPolicyOptions: () => Promise<PasswordGeneratorPolicyOptions>;
saveOptions: (options: any) => Promise<any>;
getHistory: () => Promise<GeneratedPasswordHistory[]>;
addHistory: (password: string) => Promise<any>;