This is the GitHub repository for my blogpost published on aykutbuyukkaya.codes.
You can find the exact post link here.
Password rules are as follows:
- Minimum 10 maximum 128 characters.
- At least one English uppercase letter.
- At least one English lowercase letter.
- At least one digit character.
- At least one special character.
- No whitespaces are allowed.
- Java 17
- Maven (4.0.0)
- Spring Boot (2.7.2 with Spring Data JPA, Spring Web, and Spring Validation)
- Passay (For password constraints)
- H2 Database (Database for test purposes)
- Lombok (To reduce boilerplate code)
- Springdoc Swagger-UI (For API testing)
These are APIs that we need to provide:
Method | Route | Parameter Type | Parameter Info | Description |
---|---|---|---|---|
POST |
{{baseUrl}}/authentication/signup | Body | {"email": "string","password": "string"} | User sign up process with password validation. |
On project root file:
$ mvn clean install
$ java -jar target/java-password-validation-example-0.0.1-SNAPSHOT.jar