This is a proyect to show JavaEE capabilities with RESTful and JSF client.
Steps to run this project:
- Clone this Git repository
- Build the application with
mvn clean package - Start you Docker deamon
- Build the Docker image with
docker build -t portalweb:1.1 . - Star Docker compose with
docker-compose -f docker/simple/docker-compose.yml up --force-recreate - Wait until the Payara server launched successfully and visit
http://localhost:8080/portalweb
There are 4 users created Joe, Sam, Tom, Sue and developer. All use 'secret' as password
Role Maping
| User | Role | Description |
|---|---|---|
| Joe | USER_ROLE | can access |
| Sam | ADMIN_ROLE | can access and admin |
| developer | ADMIN_ROLE | can access and admin |
All other user cann't access by default
You can interact with the result api with relative endpoint http://localhost:8080/portalweb-service/rest/v1 this api use
basich auth (use the credentials username:Joe password:secret, use the same users above).
- Try to get the list of user
GET http://localhost:8080/portalweb-service/rest/v1/user - Try to see the Role asociate to user
GET http://localhost:8080/portalweb-service/rest/v1/userrole/user/1
A postman collection was added to the project to test the minimun functionality for the frontend in testing/rest-api/simple-web-app-api.postman_collection.json.
For future use this collection to test new backend implementations (Rest API) without changing the frontend implementation