Simple template for a REST serving vert.x server
mvn clean install
java -jar target/server.vertx-1.0.jar
or
java -jar target/server.vertx-1.0.jar --port 8080
GET http://localhost:4444/echo
A dummy session service knows only two users:
- admin (with an Admin role) and
- user (with a User role)
(both have password set to "password")
GET http://localhost:4444/login?username=user&password=password
GET http://localhost:4444/login?username=admin&password=password
The response will return a session in the X-SessionId
cookie.
Call the following REST with X-SessionId
header:
GET http://localhost:4444/info
Only admin has access to following REST API:
GET http://localhost:4444/private