Implemented `dispense add` in server
[tpg/opendispense2.git] / proto.txt
index f3734aa..8c1dbed 100644 (file)
--- a/proto.txt
+++ b/proto.txt
@@ -27,14 +27,14 @@ general they will be limited to the standard alpha-numeric set
 === User Auth ===
 c      USER <username>\n
 s      100 SALT <string>\n or 100 User Set\n   (If no salt used)
-c      PASS <hash>\n   (Hex-Encoded SHA-512 Hash of <username><salt><password>)
+c      PASS <hash>\n   (Hex-Encoded SHA-1 Hash of <username><salt><password>)
 s      200 Auth OK\n or 401 Auth Failure\n
 User is now authenticated
 --- Alternate Method (Implicit Trust Authentication) ---
 If the client is connecting from a trusted machine on a root port then
 automatic authentication is allowed
 c      AUTOAUTH <username>\n
-s      200 Auth OK\n or 401 Auth Failure\n or 401 Untrusted\n
+s      200 Auth OK\n or 404 Bad Username\n or 401 Untrusted\n
 
 === Commands ===
 --- Dispense an item ---
@@ -43,8 +43,11 @@ s    200 Dispense OK\n or 402 Poor You\n or 500 Dispense Error\n or 406 Bad Item\n
 --- Give to another user ---
 c      GIVE <user> <ammount> <reason>\n
 s      200 Give OK\n or 402 Poor You\n or 404 Bad User\n
---- Update balance ---
+--- Alter balance ---
 c      ADD <user> <ammount> <reason>\n
+s      200 Add OK\n or 402 No balance\n or 403 Not Coke\n or 404 Bad User\n
+--- Set balance ---
+c      SET <user> <ammount> <reason>\n
 s      200 Add OK\n or 403 Not Coke\n or 404 Bad User\n
 
 --- Get Item list ---

UCC git Repository :: git.ucc.asn.au