This is a challenge from BackEndBrasil
The project provides a simple password validation API with basic security criteria.
To run the project locally, follow these steps:
- Clone the repository:
git clone https://github.com/RianNegreiros/secure-password.git
- Navigate to the project directory:
cd secure-password
- Run the application:
go run cmd/main.go
The API will be accessible at http://localhost:8080/validate-password
.
- Endpoint: POST
/validate-password
- Request Body: JSON with a single field password
- Response:
- 204 No Content if the password meets the security criteria.
- 400 Bad Request with error messages if the password is invalid.
To run the tests, use the following command:
go test ./...
To manually test, you can use curl:
curl -X POST -H "Content-Type: application/json" -d '{"password": "yourPASSWORD123!"}' http://localhost:8080/validate-password
If you'd like to contribute to the project, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.