X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=doc%2Fprotocole3.txt;h=02051e90809f677ac0fdf1f5b9e0065c9e6e1a97;hb=2faefc542de20cfcc0220b5c7fd7982dd0fbbfd4;hp=033c9ab10487c9ea71be5c555cfa409fb0a9e431;hpb=032b8fc6f8be99d2665e9d96a8f7f698239f96ea;p=euphorik.git diff --git a/doc/protocole3.txt b/doc/protocole3.txt index 033c9ab..02051e9 100644 --- a/doc/protocole3.txt +++ b/doc/protocole3.txt @@ -40,38 +40,49 @@ Message ok g } -=== Login === -Le mot de passe est hashé en md5. -L'action 'register' permet de créer un nouvel utilisateur. +=== Enregistrement et authentification === +Permet de créer un nouvel utilisateur. +"login" et "password" peuvent ne pas être fournis avec un message de type "register", dans ce cas l'utilisateur ne pourra s'authentifier qu'a l'aide de son cookie. +Le mot de passe est hashé en md5. -c -> s - { - "action" : "authentification", - "login" : "Paul", - "password" : "IJKJDHHSAD9081238" +c -> s + { + "action" : "authentification", + "login" : "paul", + "password" : "IJKJDHHSAD9081238" } -ou - { - "action" : "authentification", - "cookie" : "LKJDLAKSJBFLKASN" +ou + { + "action" : "authentification", + "cookie" : "LKJDLAKSJBFLKASN" } -ou - { - "action" : "register", - "login" : "Paul", - "password" : "IJKJDHHSAD9081238" +ou + { + "action" : "register", + "login" : "paul", + "password" : "IJKJDHHSAD9081238" } -s -> c - { - "reply" : "login", - "status" : "registration_ok" | "authentification_ok", +s -> c + { + "reply" : "register" | "authentification", + "status" : "auth_not_registered", + "cookie" : "LKJDLAKSJBFLKASN", + "id" : 193, + "css" : "css/1/euphorik.css", + "main_page" : 1 + } +ou + { + "reply" : "register" | "authentification", + "status" : "auth_registered", "cookie" : "LKJDLAKSJBFLKASN", "id" : 193, - "pseudo" : "Paul", + "nick" : "Paul", "login" : "paul49", "email" : "paul@pierre.com", - "css" : "css/3/euphorik.css", + "css" : "css/3/euphorik.css", + "nick_format" : "nick" | "login" | "nick_login", "main_page" : 1, "conversations" : [ { @@ -97,13 +108,14 @@ c -> s "cookie" : "LKJDLAKSJBFLKASN", "login" : "paul49", "password" : "IJKJDHHSAD9081238", - "pseudo" : "Paul", + "nick" : "Paul", "email" : "paul@pierre.com", - "css" : "css/3/euphorik.css", + "css" : "css/3/euphorik.css", + "nick_format" : "nick" | "login" | "nick_login", "main_page" : 1, "conversations" : [ { - "racine" : 123, + "root" : 123, "page" : 1 } ] @@ -117,7 +129,8 @@ ou === Wait event === Si "last_message_id" est absent alors le client ne possède pas de message. -Les conversations lié aux trolls sont définies dans le profile. +Si "main_page" est absent alors est vaut 1. +"cookie" n'est pas obligatoire. c -> s { @@ -126,6 +139,7 @@ c -> s "cookie" : "LKJDLAKSJBFLKASN", "message_count" : 10, "last_message_id" : 163, + "main_page" : 1 "conversations" : [ { "racine" : 123, @@ -155,7 +169,7 @@ Le format de la date n'est pas formel. "login" : "paul_22", "content" : "Salut", "answer_to" : [ - { "id" : 123, "pseudo" : "Pierre", "login" : "pierre_45" } + { "id" : 123, "nick" : "Pierre", "login" : "pierre_45" } ] } ]