Version 1.0.0 is the initial release. This is the first version of the usage document.
During development, the server is designed to be run using the Maven Jetty plugin. Running the server can be done using the following command in the main directory containing the pom.xml:
mvn jetty:run
The following User and Group will be created.
A user with a username of "admin" is created. A group with a name of "admin" is created. The user "admin" is added as a member of the "admin" group.
The "admin" group is a special group. Members of this group have administrative authorization. They can perform all of the administrative functions. Non-members are limited to maintenance of their own account.
None of the changes are persisted. Each time the service starts, the only user and group values available will be the default values discussed above.
Get a list of groups.
curl -v http://localhost:8080/exampleRest/group/ -u admin:password
Get a list of users.
curl -v http://localhost:8080/exampleRest/user/ -u admin:password
Create a new user.
curl -v -X POST -d @createUser.xml -H "Content-Type: text/xml" http://localhost:8080/exampleRest/user/ -u admin:password
Get a list of users.
curl -v http://localhost:8080/exampleRest/user/ -u admin:password
Create a new group.
curl -v -X POST -d @createGroup.xml -H "Content-Type: text/xml" http://localhost:8080/exampleRest/group/ -u admin:password
Get a list of groups.
curl -v http://localhost:8080/exampleRest/group/ -u admin:password
List the user members of the subscriber group.
curl -v http://localhost:8080/exampleRest/group/subscriber/user/ -u admin:password
Add bob to the subscriber group.
curl -v -X POST -d @member.txt -H "Content-Type: text/plain" http://localhost:8080/exampleRest/group/subscriber/user/ -u admin:password
List the user members of the subscriber group.
curl -v http://localhost:8080/exampleRest/group/subscriber/user/ -u admin:password
Create user alice.
curl -v -X POST -d @createAlice.xml -H "Content-Type: text/xml" http://localhost:8080/exampleRest/user/ -u admin:password
Set bob's initial password.
curl -v -X PUT -d @password.txt -H "Content-Type: text/plain" http://localhost:8080/exampleRest/user/bob/password -u admin:password
Set alice's initial password.
curl -v -X PUT -d @password.txt -H "Content-Type: text/plain" http://localhost:8080/exampleRest/user/alice/password -u admin:password
Have bob get his user information.
curl -v http://localhost:8080/exampleRest/user/bob -u bob:password
Show alice unable to get bob's user information.
curl -v http://localhost:8080/exampleRest/user/bob -u alice:password
Have alice get her user information.
curl -v http://localhost:8080/exampleRest/user/alice -u alice:password
Have bob update his password.
curl -v -X PUT -d @password1234.txt -H "Content-Type: text/plain" http://localhost:8080/exampleRest/user/bob/password -u bob:password
Have bob try to get his user information with old password.
curl -v http://localhost:8080/exampleRest/user/bob -u bob:password
Have bob get his user information with new password.
curl -v http://localhost:8080/exampleRest/user/bob -u bob:1234
Have bob update his information.
curl -v -X PUT -d @updateUser.xml -H "Content-Type: text/xml" http://localhost:8080/exampleRest/user/bob -u bob:1234
Have bob get his user information.
curl -v http://localhost:8080/exampleRest/user/bob -u bob:1234
Get a list of users.
curl -v http://localhost:8080/exampleRest/user/ -u admin:password
Delete user alice.
curl -v -X DELETE http://localhost:8080/exampleRest/user/alice -u admin:password
Get a list of users.
curl -v http://localhost:8080/exampleRest/user/ -u admin:password