IllegalSequenceRule with custom character sequences example 2

In previous post under Passay, I showed one example of how to use “IllegalSequenceRule” with custom character sequences. This post is continuation of the previous post with another example. In the previous post, I used different two custom character sequences, one character sequence containing only numbers and another character sequence containing only alphabets. In this…… Continue reading IllegalSequenceRule with custom character sequences example 2

IllegalSequenceRule with custom character sequences example 1

In previous post under Passay, I showed with example the purpose of “IllegalSequenceRule”. For recap, this rule makes sure that the password doesn’t contain the given character sequence, for example “qwerty” character sequence. So if the password is “qwerty” or “sam_qwerty_@”, the validation will fail but if the password is “aabb”, the validation passes. When…… Continue reading IllegalSequenceRule with custom character sequences example 1

IllegalSequenceRule example

In this post under Passay, I will explain with example the purpose of “IllegalSequenceRule” class. This class is used to verify that the user given password doesn’t contain known illegal sequence of characters like “qwerty” etc. Below is the complete code showing how to use it Main class package defaultPackage; import org.passay.EnglishSequenceData; import org.passay.IllegalSequenceRule; import…… Continue reading IllegalSequenceRule example

Generating random password using only user defined characters

In this post under Passay, I will show with example how to generate random password using user defined characters. To generate a random password, we need to come up with a list of “CharacterRule” instances. Each “CharacterRule” class take two data as constructor arguments as listed below1) instance of “CharacterData” interface2) min number of characters…… Continue reading Generating random password using only user defined characters

Checking whether the password is already present in another source

In this post under Passay, I will show how to check whether the password is already used in another source. Below is the complete main class for your reference. Main class 1 package defaultPackage; 2 3 import java.util.ArrayList; 4 import java.util.List; 5 6 import org.passay.PasswordData; 7 import org.passay.PasswordData.SourceReference; 8 import org.passay.PasswordValidator; 9 import org.passay.RuleResult; 10…… Continue reading Checking whether the password is already present in another source

Checking whether the password is already used in your application

In this post under Passay, I will show with example how to check whether a user entered password is already used in the application or not. Below is the complete main code for your reference Main class 1 package defaultPackage; 2 3 import java.util.ArrayList; 4 import java.util.List; 5 6 import org.passay.HistoryRule; 7 import org.passay.PasswordData; 8…… Continue reading Checking whether the password is already used in your application