X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=modules%2Ferl%2Feuphorik_protocole.erl;h=f56a335af65af640125937a067ddb3266d20cda2;hp=251d4c11cf555d1b19fdab4d1bc691c9d61e4a35;hb=7ed3a03bffb4112ee174b05ef1d7b486d6ad6534;hpb=86c0fb538b1e7e62c2ffe667735e554cf6c4b244 diff --git a/modules/erl/euphorik_protocole.erl b/modules/erl/euphorik_protocole.erl index 251d4c1..f56a335 100755 --- a/modules/erl/euphorik_protocole.erl +++ b/modules/erl/euphorik_protocole.erl @@ -8,8 +8,6 @@ -module(euphorik_protocole). -export([ - %generation_captcha/1, Obsolète - %nouveau_user_captcha/1, Obsolète nouveau_user_login/1, login/1, logout/1, @@ -22,34 +20,6 @@ -include("../include/euphorik_bd.hrl"). -include("../include/euphorik_defines.hrl"). - -% Génère un nouveau captchat dans ?DOSSIER_CAPTCHA -% Obsolète -%~ generation_captcha(_) -> - %~ {Mot_crypt, Nom_fichier} = captcha:create(5, ?DOSSIER_CAPTCHA), - %~ simple_xml_to_string(xml_reponse_generation_captcha(?DOSSIER_CAPTCHA_RELATIF "/" ++ Nom_fichier, Mot_crypt)). - - -% Un nouvel utilisateur doit être créé. -% Obolète : le captcha n'existe plus -% Action est un xmlElement(). -%~ nouveau_user_captcha(Action) -> - %~ simple_xml_to_string( - %~ case {xmerl_xpath:string("captchaCrypt", Action), xmerl_xpath:string("captchaInput", Action)} of - %~ {[#xmlElement{content = [#xmlText{value = C1}]}], [#xmlElement{content = [#xmlText{value = C2}]}]} -> - %~ C2_crypt = common:crypt(C2), - %~ if C1 =:= C2_crypt -> - %~ Cookie = generer_cookie(), - %~ User = euphorik_minichat:nouveau_user("Paul", Cookie), - %~ xml_reponse_login_ok(User); - %~ true -> - %~ xml_reponse_login_pas_ok("Captcha incorrect") - %~ end; - %~ _ -> - %~ xml_reponse_login_pas_ok("XML malformé") - %~ end - %~ ). - % Une utilisateur s'enregistre avec un tuple {Login, Password}. % @spec nouveau_user_login(xmerl:xmlElement()) -> string() @@ -374,16 +344,5 @@ xml_reponse_message(Ok) -> ] } ]. - - -% Obsolète -%~ xml_reponse_generation_captcha(Chemin, Captcha) -> - %~ [ - %~ {reponse, [{name, "generationCaptcha"}], - %~ [ - %~ {chemin, [], [Chemin]}, - %~ {captchaCrypt, [], [Captcha]} - %~ ] - %~ } - %~ ]. + %%%%%%%%% %%%%%%%%%