X-Git-Url: https://dev.renevier.net/gitweb.cgi?p=syp.git;a=blobdiff_plain;f=devdoc%2Fapi.txt;h=804c0c4d4baba7295f629a5d0af4d1651e0c8087;hp=e02b78dc8872a4c24762f7d2b8fdfe205339350b;hb=939514b912738c5784b04a0d207db1afd918eb69;hpb=3b38ca36fc18d34999073625a9c66dc2f05747a3 diff --git a/devdoc/api.txt b/devdoc/api.txt index e02b78d..804c0c4 100644 --- a/devdoc/api.txt +++ b/devdoc/api.txt @@ -20,6 +20,20 @@ but server may be written in any language. ## auth asks for authentication +## changepass + change user password + * `$_POST ["pass_current"]` must contain current password. This is needed: cookie + authentification is not enough. + * `$_POST ["pass_new"]` must contain new password + +## newuser + adds a new user + * `$_POST ["newuser_name"]` must contain user name + * `$_POST ["newuser_password"]` must contain user password + + Only admin can add new users. + + ## add adds a new feature @@ -71,12 +85,21 @@ as _text/html_ * `toobig`: uploaded file was too big * `notation`: uploaded file was not an image * `nochange`: when trying to update a feature, there is nothing to update (ie: no field of the feature has changed) + * `wrongpass`: wrong current password when trying to change password + * `newuser_exists`: when trying to add an user which has the same name as an already registered user ## success handling: * `?user_name?`: authentication was successfull. ?user_name? is name of authenticated user. + * `?user_name?`: + new user addition was successfull. ?user_name? is name of newly added user. + + * `?user_name?`: + password change was successfull. ?user_name? is name user whose password + has been changed. + * ` ?id?