mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
[PM-16793] port credential generator service to providers (#14071)
* introduce extension service * deprecate legacy forwarder types * eliminate repeat algorithm emissions * extend logging to preference management * align forwarder ids with vendor ids * fix duplicate policy emissions; debugging required logger enhancements ----- Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
This commit is contained in:
@@ -7,7 +7,7 @@ import { BehaviorSubject, map } from "rxjs";
|
||||
|
||||
import { PolicyType } from "@bitwarden/common/admin-console/enums";
|
||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||
import { Generators } from "@bitwarden/generator-core";
|
||||
import { BuiltIn, Profile } from "@bitwarden/generator-core";
|
||||
|
||||
import { BasePolicy, BasePolicyComponent } from "./base-policy.component";
|
||||
|
||||
@@ -26,14 +26,22 @@ export class PasswordGeneratorPolicy extends BasePolicy {
|
||||
export class PasswordGeneratorPolicyComponent extends BasePolicyComponent {
|
||||
// these properties forward the application default settings to the UI
|
||||
// for HTML attribute bindings
|
||||
protected readonly minLengthMin = Generators.password.settings.constraints.length.min;
|
||||
protected readonly minLengthMax = Generators.password.settings.constraints.length.max;
|
||||
protected readonly minNumbersMin = Generators.password.settings.constraints.minNumber.min;
|
||||
protected readonly minNumbersMax = Generators.password.settings.constraints.minNumber.max;
|
||||
protected readonly minSpecialMin = Generators.password.settings.constraints.minSpecial.min;
|
||||
protected readonly minSpecialMax = Generators.password.settings.constraints.minSpecial.max;
|
||||
protected readonly minNumberWordsMin = Generators.passphrase.settings.constraints.numWords.min;
|
||||
protected readonly minNumberWordsMax = Generators.passphrase.settings.constraints.numWords.max;
|
||||
protected readonly minLengthMin =
|
||||
BuiltIn.password.profiles[Profile.account].constraints.default.length.min;
|
||||
protected readonly minLengthMax =
|
||||
BuiltIn.password.profiles[Profile.account].constraints.default.length.max;
|
||||
protected readonly minNumbersMin =
|
||||
BuiltIn.password.profiles[Profile.account].constraints.default.minNumber.min;
|
||||
protected readonly minNumbersMax =
|
||||
BuiltIn.password.profiles[Profile.account].constraints.default.minNumber.max;
|
||||
protected readonly minSpecialMin =
|
||||
BuiltIn.password.profiles[Profile.account].constraints.default.minSpecial.min;
|
||||
protected readonly minSpecialMax =
|
||||
BuiltIn.password.profiles[Profile.account].constraints.default.minSpecial.max;
|
||||
protected readonly minNumberWordsMin =
|
||||
BuiltIn.passphrase.profiles[Profile.account].constraints.default.numWords.min;
|
||||
protected readonly minNumberWordsMax =
|
||||
BuiltIn.passphrase.profiles[Profile.account].constraints.default.numWords.max;
|
||||
|
||||
data = this.formBuilder.group({
|
||||
overridePasswordType: [null],
|
||||
|
||||
@@ -547,12 +547,6 @@
|
||||
"message": "Toggle collapse",
|
||||
"description": "Toggling an expand/collapse state."
|
||||
},
|
||||
"generatePassword": {
|
||||
"message": "Generate password"
|
||||
},
|
||||
"generatePassphrase": {
|
||||
"message": "Generate passphrase"
|
||||
},
|
||||
"checkPassword": {
|
||||
"message": "Check if password has been exposed."
|
||||
},
|
||||
@@ -6825,6 +6819,24 @@
|
||||
"generateEmail": {
|
||||
"message": "Generate email"
|
||||
},
|
||||
"generatePassword": {
|
||||
"message": "Generate password"
|
||||
},
|
||||
"generatePassphrase": {
|
||||
"message": "Generate passphrase"
|
||||
},
|
||||
"passwordGenerated": {
|
||||
"message": "Password generated"
|
||||
},
|
||||
"passphraseGenerated": {
|
||||
"message": "Passphrase generated"
|
||||
},
|
||||
"usernameGenerated": {
|
||||
"message": "Username generated"
|
||||
},
|
||||
"emailGenerated": {
|
||||
"message": "Email generated"
|
||||
},
|
||||
"spinboxBoundariesHint": {
|
||||
"message": "Value must be between $MIN$ and $MAX$.",
|
||||
"description": "Explains spin box minimum and maximum values to the user",
|
||||
@@ -6888,6 +6900,9 @@
|
||||
"useThisPassword": {
|
||||
"message": "Use this password"
|
||||
},
|
||||
"useThisPassphrase": {
|
||||
"message": "Use this passphrase"
|
||||
},
|
||||
"useThisUsername": {
|
||||
"message": "Use this username"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user