File

core/authentication/password-strength.service.ts

Index

Properties
Methods

Constructor

constructor(ui: AppStateService)
Parameters :
Name Type Optional
ui AppStateService No

Methods

Async getEnforcePasswordStrength
getEnforcePasswordStrength(refresh?)

Checks if password strength is enforced for system by retrieving value of enforceStrength property from loginOptions response If false, it takes value from memory, if true, it refresh the app state value and then retrives data.

Parameters :
Name Optional Description
refresh Yes

boolean used to refresh the app state where result of loginOptions response is stored. If false, it takes value from memory, if true, it refresh the app state value and then retrives data.

Returns : unknown

boolean value, true if enforced, false otherwise.

Async getGreenMinLength
getGreenMinLength()

Gets the minimal number of characters that a password should have to be considered a “green” strong one.

Returns : unknown

The min length for password or default value.

Async getPasswordStrengthEnforced
getPasswordStrengthEnforced(options?: literal type)

Function determines if enforced strength checks should be enabled for current tenant based on properties retrieved from loginOptions

  • {refresh: true} - refreshes values of app state and returns fresh values as result of call
Parameters :
Name Type Optional Description
options literal type Yes

object containing specific options:

  • {refresh: true} - refreshes values of app state and returns fresh values as result of call
Returns : unknown

boolean value, true if strength is enforced for tenant, false otherwise.

Async getPasswordStrengthValidity
getPasswordStrengthValidity(refresh)

Checks if password strength is enforced for particular tenant by retrieving value of strengthValidity property from loginOptions response If false, it takes value from memory, if true, it refresh the app state value and then retrives data.

Parameters :
Name Optional Default value Description
refresh No false

boolean used to refresh the app state where result of loginOptions response is stored. If false, it takes value from memory, if true, it refresh the app state value and then retrives data.

Returns : unknown

boolean value, true if enforced, false otherwise.

Properties

GREEN_MIN_LENGTH_DEFAULT
Type : number
Default value : 8

results matching ""

    No results matching ""