File

core/authentication/password-check-list.component.ts

Implements

OnInit

Metadata

Index

Properties
Methods
Inputs
Accessors

Constructor

constructor(loginService: LoginService, passwordStrengthChecker: PasswordService, passwordService: PasswordService)
Parameters :
Name Type Optional
loginService LoginService No
passwordStrengthChecker PasswordService No
passwordService PasswordService No

Inputs

password
Type : string

Methods

Async ngOnInit
ngOnInit()
Returns : any
onPasswordChange
onPasswordChange(password)
Parameters :
Name Optional
password No
Returns : void

Properties

checklist
Type : []
Default value : [ { label: gettext('Include lowercase characters (for example, abcdef)'), check: this.passwordStrengthChecker.hasLowerCase, icon: '', contextualColor: '' }, { label: gettext('Include uppercase characters (for example, ABCDEF)'), check: this.passwordStrengthChecker.hasUpperCase, icon: '', contextualColor: '' }, { label: gettext('Include numbers (for example, 123456)'), check: this.passwordStrengthChecker.hasNumbers, icon: '', contextualColor: '' }, { label: gettext('Include symbols (for example, !@#$%^)'), check: this.passwordStrengthChecker.hasSpecialChars, icon: '', contextualColor: '' }, { label: gettext('Must have at least {{length}} characters'), check: password => password.length >= this.minGreenLength, icon: '', contextualColor: '' } ]
Public loginService
Type : LoginService
minGreenLength
Type : number
Default value : 0

Accessors

password
setpassword(password: string)
Parameters :
Name Type Optional
password string No
Returns : void
translateParams
gettranslateParams()
<div>
  <span class="small">{{ 'Please meet 5 out of the 5 conditions below' | translate }}:</span>
  <ul class="list-unstyled">
    <li class="small" *ngFor="let requirement of checklist">
      <i [c8yIcon]="requirement.icon" class="text-success"></i>
      <span
        class="small {{ requirement.contextualColor }}"
        [translate]="requirement.label"
        [translateParams]="this.translateParams"
      ></span>
    </li>
  </ul>
</div>

results matching ""

    No results matching ""