Thank you for visiting this repository.
I hope you find what you are looking for, otherwise please do let me know.
I will try to make this repository as complete as possible.
Do not forget to follow the repository for further updates.
- Java 17 or higher
- Docker Desktop
- An IDE (Integrated Development Environment)
- Open Docker Desktop
- Open this repository within your preferred IDE
- Open a terminal within your IDE on location
yourlocation\spring-boot-3-security
- Type
docker compose up -d
- Now start the application
- Open the database on: http://localhost:5050
- Add a database called
postgres
- Use the credentials as per the
application-database.yml
file (located within folder:yourlocation\spring-boot-3-security\src\main\resources
)
Description: Authenticate a user
Request URL: http://localhost:8081/api/v3/auth/authenticate
Example JSON
Body:
{
"usernameOrEmail": "admin",
"password": "Admin123!"
}
Other login credentials:
user
User123!
moderator
Moderator123!
Description: Register a new user
Request URL: http://localhost:8081/api/v3/auth/register
Example JSON
Body:
{
"firstName": "Jeffrey",
"lastName": "Spaan",
"email": "[email protected]",
"username": "myusername",
"password": "mypassword"
}
Description: Demo API for testing purposes
Request URL: http://localhost:8081/api/v3/demo
Description: Retrieve a list of all registered users
Required: Authorization Bearer token
Request URL: http://localhost:8081/api/v3/users
/id
Description: Retrieve a registered user by its ID
Required: Authorization Bearer token
Request URL: http://localhost:8081/api/v3/users/1
Description: Update a registered user by its ID
Request URL: http://localhost:8081/api/v3/users/1
Example JSON
Body:
{
"firstName": "Jeffrey",
"lastName": "Spaan",
"email": "[email protected]",
"username": "myupdatedusername",
"password": "myupdatedpassword"
}
/id
Description: Delete a registered user by its ID
Required: Authorization Bearer token
Request URL: http://localhost:8081/api/v3/users/1
More to follow...