COMP 3601
Assignment 1
Due Anytime October 13, 2016
1- Extend this class with the following:
- Create a new Jersey endpoint called authentication. This endpoint should support paths create, login, logoff and validate.
- The parameters for create are a userid and a password. This combination can be stored in a user list stored locally in the endpoint class
- The parameters for login are a userid and a password. This combination is matched against the user list stored locally in the endpoint class. If the token userid and entry return an
encrypted token containing the userid and the current timestamp. If the combination does not match return an error response
- The parameter for logout are an encrypted token. This token is decrypted and then matched against the of list of users stored locally in the endpoint class. If the token userid matches an
an existing user in the list, remove the user from the list and return a completion response. If the token userid does not match return an error response
- The parameter for validate are an encrypted token. This token is decrypted and the timestamp compared to the current time. If timestamp has not expired return true, otherwise a false response
- Write JUnit Jersey client side code to test your endpoints
Here is an example of test method one could write for the original class task.
Zip and submit your Eclipse project for submission.