In this post under Passay, I will explain with example the purpose of “WhitespaceRule”. Sometimes user chooses a password that will have whitespaces. If you want to restrict user from creating a password that does have whitespaces, you can use “WhitespaceRule” class. “WhitespaceRule” class makes sure that the password set by the user doesn’t have…… Continue reading Checking whether the password have whitespaces or not
Category: Passay
Checking whether password contains username or not
In this post under Passay, I will show with example the purpose and how to use “UsernameRule” class. When a user register on a website they come up with username and password. They tend to create a password that is easy to remember for example using DOB as password, nick name as password etc. Sometimes…… Continue reading Checking whether password contains username or not
IllegalCharacterRule example
In this post under Passay, I will explain with example the purpose and how to use “IllegalCharacterRule” class. In the previous, I explained the purpose of “AllowedCharacterRule” class. The class “IllegalCharacterRule” is the opposite of “AllowedCharacterRule”. In “AllowedCharacterRule” we create an array of characters that should be allowed in the password text. In other words…… Continue reading IllegalCharacterRule example
AllowedCharacterRule example
In this post under Passay, I will explain with example the purpose and how to use “AllowedCharacterRule” class. When we ask a user to come up with a password, we can restrict them to use only those characters that are whitelisted by us. In that case, we can have rule with the help of Passay’s…… Continue reading AllowedCharacterRule example
HaveIBeenPwnedRule setAllowOnException method example
In previous post under Passay, I showed with example how to use “HaveIBeenPwnedRule” rule. Just for recap, there is a website “haveibeenpwned.com” that contains a list of real world passwords that were previously used and exposed as part of data breaches. This rule will check user enteredpassword against that database. If password is already present,…… Continue reading HaveIBeenPwnedRule setAllowOnException method example
HaveIBeenPwnedRule setAllowExposed method example
In previous post under Passay, I showed with example how to use “HaveIBeenPwnedRule” rule. In this post, I will explain with example the purpose of “setAllowExposed” method of “HaveIBeenPwnedRule” rule class. Just for recap, there is a website “haveibeenpwned.com” that contains a list of real world passwords that were previously used and exposed as part…… Continue reading HaveIBeenPwnedRule setAllowExposed method example
HaveIBeenPwnedRule example
In this post under Passay, I will show with example, the purpose of “HaveIBeenPwnedRule” rule class. There is website “haveibeenpwned.com” that contains a list of real world passwords that were previously used and exposed as part of data breaches. You can make sure that the password entered by the user or the password generated by…… Continue reading HaveIBeenPwnedRule example
CharacterOccurrencesRule example
In this post under Passay, I will explain with example the purpose of “CharacterOccurrencesRule” rule class. They are cases when user enters same character multiple times when comming up with their own password. If we want prevent such scenarios or if you want to keep a contol on how many times a particular character is…… Continue reading CharacterOccurrencesRule example
RepeatCharactersRule example
In this post under Passy, I will explain with example, the purpose of “RepeatCharactersRule” class. Sometimes user entered password will have “n” characters (i.e., number of characters) with each character being repeated equal to or more than “m” times. For example in case of this password “11a22b333xyz”1) n is 3 which are 1, 2, and…… Continue reading RepeatCharactersRule example
NumberRangeRule example
In this post under Passay, I will explain with example the purpose of “NumberRangeRule” class. NumberRangeRule takes a range of numbers and verifies whether the user entered password doesn’t contain numbers in that range. So “NumberRangeRule” constructor takes two arguments1) starting number (inclusive)2) ending number (exclusive) Below is the complete Main class for your reference…… Continue reading NumberRangeRule example