Overview

The passwordStrength component is usually needed by the web sites which require a powerful user's password for the purpose of the registration stuff.

The component's users can know the strength of the password while typing before even submitting the page to the server.

The component's users can define custom security policy for their passwords in an easy manner.

The component has two types of the password strength representation. Till now the password strength can be represented as text or progressbar.

Usage

		<s:passwordStrength    [id="txtPwdText"] 
				       [preferredPasswordLength="10"]
				       [value="#{passwordStrengthBean.password}"] 
				       [prefixText="Strength : "]
				       [textStrengthDescriptions="Very Poor;Weak;Average;Strong;Excellent"] 
				       [strengthIndicatorType="text|bar"]
				       [useCustomSecurity="true|false"]
				       [customSecurityExpression="A3S2N3A2"] 
				       [penaltyRatio="50"]>				       
		</s:passwordStrength>

Attributes

preferredPasswordLength - defines the preferred length of the password. It is required.

textStrengthDescriptions - defines the text strength descriptions that defines the strength levels. It is optional. Default is "Very Poor;Weak;Average;Strong;Excellent" (5 levels).

prefixText - The prefix of the textStrengthDescriptions message. It is optional. Default is "Strength : ".

showDetails - This flag {true | false} determines whether to show the details "The Left Characters" or not. It is optional. Default is true.

strengthIndicatorType - This flag {true | false} determines the strength indicator type. It can be {text | bar}. It is optional. Default is text.

useCustomSecurity - This flag {true | false} determines whether to use custom security rule instead of just depending on the password length or not. It is optional. Default is false.

customSecurityExpression -
This string determines the expression of the custom security policy of the password.
Note that the expression has the following simple format :

*******************************************************

S (Number) N (Number) A (Number)

Where S stands for Symbols
Where N stands for Numbers

Where A stands for Alphabets

*******************************************************

For example) A4N2S3A2

Means that the password will be as following :

4 or more Alphabets followed by

2 or more Numbers followed by

3 or more Symbols followed by

2 or more Alphabets

*******************************************************

Note that the useCustomSecurity should be set to true to activate this attribute.

penaltyRatio - This attribute determines the penalty ratio that will decrease the password Strength if the custom security expression is not met. Possible values from 0 to 100. Default value is 50. Note that the useCustomSecurity should be set to true to activate this attribute.

  • No labels