comparison mod_register_json.wiki @ 345:73b078aeaf84

Added description of the http error codes' meaning.
author maranda3985@gmail.com
date Mon, 29 Apr 2013 21:17:31 +0000
parents 980a177b8a19
children a058cd983c6b
comparison
equal deleted inserted replaced
344:980a177b8a19 345:73b078aeaf84
24 {"username":"usernameofchoice","password":"theuserpassword","ip":"theremoteaddroftheuser","mail":"usermail@usermaildomain.tld","auth_token":"yourauthtokenofchoice"} 24 {"username":"usernameofchoice","password":"theuserpassword","ip":"theremoteaddroftheuser","mail":"usermail@usermaildomain.tld","auth_token":"yourauthtokenofchoice"}
25 </code> 25 </code>
26 26
27 Your form implementation needs to pass *all* parameters, the auth_token is needed to prevent misuses, if the request is successfull the server will answer with status code 200 and with the body of the response containing the token which your web app can send via e-mail to the user to complete the registration. 27 Your form implementation needs to pass *all* parameters, the auth_token is needed to prevent misuses, if the request is successfull the server will answer with status code 200 and with the body of the response containing the token which your web app can send via e-mail to the user to complete the registration.
28 28
29 Else, it will reply with the following http error codes:
30
31 * 400 - if there's an error syntax;
32 * 401 - whenever an username is already pending registration or the auth token supplied is invalid;
33 * 403 - whenever registration is forbidden (blacklist, filtered mail etc.);
34 * 406 - if the username supplied fails nodeprepping;
35 * 409 - if the user already exists, or an user is associated already with the supplied e-mail;
36 * 503 - whenever a request is throttled.
37
29 The module for now stores a hash of the user's mail address to help slow down duplicated registrations. 38 The module for now stores a hash of the user's mail address to help slow down duplicated registrations.
30 39
31 It's strongly encouraged to have the web server communicate with the servlet via https. 40 It's strongly encouraged to have the web server communicate with the servlet via https.
32 41
33 = Usage = 42 = Usage =