Simple template server with RestEasy REST API
mvn clean install
java -jar server-jetty-1.0.jar
or
java -jar server-jetty-1.0.jar --port 8080
GET http://localhost:4444/rest/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/rest/login?username=user&password=password
GET http://localhost:4444/rest/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/rest/info
Only admin has access to following REST API:
GET http://localhost:4444/rest/private