You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by Apache Wiki <wi...@apache.org> on 2007/09/08 04:49:27 UTC

[Myfaces Wiki] Update of "PasswordStrength" by HazemSaleh

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.

The following page has been changed by HazemSaleh:
http://wiki.apache.org/myfaces/PasswordStrength

New page:
= Overview =
The passwordStrength component is needed by the web sites which ask the user to enter a powerful password for the purpose of the registration stuff. 

The component enables its user to know the strength of the password while (he/she) types it before even submit the form to the server. 

The component enables its user to define his custom security policy for his password in an easy manner.

The component also have 2 types of presenting the password strength. Till now the 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.