INFORMATION TECHNOLOGIES OF THE REPUBLIC OF UZBEKISTAN
AND THE MINISTRY OF COMMUNICATIONS DEVELOPMENT
IN THE NAME OF MUHAMMAD AL KHOREZMI
TASHKENT UNIVERSITY OF INFORMATION TECHNOLOGIES
Department of Telecommunication Engineering.
Basics of Network Programming.
st Independent work
Topic: Passay Library
Group: 025-18.
Completed by: Ibrayimov A.
Reviewed by: Djurayev O.
TASHKENT-2022
Plan:
Intoduction.
Body Part:
Maven Dependency
Password Validation
Password Generation
Positive Matching Rules
Nagative Matching Rules
Customized Message
Conclusion.
Used publications and web-sites
Introduction
Nowadays, most web applications have their password policy – which is, simply put, created to force users to create difficult to break passwords.
To generate such passwords or validate them we can make use of Passay library.
Maven Dependency
If we want to use Passay library in our project, it's necessary to add the following dependency to our pom.xml:
<dependency>
<groupId>org.passaygroupId>
<artifactId>passayartifactId>
<version>1.3.1version>
dependency>
We can find it here.
Password Validation
Password validation is one of two main functionalities provided by Passay library. It's effortless and intuitive. Let's discover it.
3.1. PasswordData
To validate our password, we should use PasswordData. It's a container for information that is necessary for validation. It can store such data as:
password
username
list of password references
origin
Password and username properties explain themselves. Passay library gives us HistoricalReference and SourceReference which we can add to the list of password references.
We can use the origin field to hold information about whether the password was generated or defined by a user.
3.2. PasswordValidator
Do'stlaringiz bilan baham: |