= AccountServer The AccountServer is a very lightweight apache tomcat application that builds on top of the [wiki:AccountManager] to build a set of web pages allowing internet based account handling =Core functionality The core of the AccountServer is the Account servlet. It has four modes * GET: this returns a json structure {"name":username, "id":userid} with the current user name and id. It returns error 500 if the user is not logged in. * POST: this is a login request. Extra data to be send is a NamePassword structure which basically is {'name':XXX, 'password':YYY} json structure. As long as the browser does not start a new session (this depends on the browser but usually this means "staying on the same page") the user stays logged in. * PUT: this is a register request. Extra data to be send is a NamePasswordEmail structure which basically is {'name':XXX, 'password':YYY, 'email':ZZZ} json structure. The email can be empty. This creates a new account if the name. * DELETE. this is a reset-password request. This takes just the user name (string) and mails the user a new password. This fails with error 500 if the user does not exist or did not set his email properly. If you run this on a tomcat server, the startpage is {{{http://localhost:8080/accountserver/}}}. You get a login prompt [[Image(https://tracinsy.ewi.tudelft.nl/pubtrac/Utilities/raw-attachment/wiki/AccountServer/login.png)]] To register, you click on the register button, after which you get this [[Image(https://tracinsy.ewi.tudelft.nl/pubtrac/Utilities/raw-attachment/wiki/AccountServer/register.png)]]