From 5bcee0b19ba2a6a9951db6bd9f9a919ac441a4c5 Mon Sep 17 00:00:00 2001 From: Samuel Date: Sun, 26 Nov 2023 15:14:56 +0100 Subject: [PATCH] auth conception fixed --- Documentation/mvc/auth.puml | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/Documentation/mvc/auth.puml b/Documentation/mvc/auth.puml index d416bc3..8a2bb1f 100644 --- a/Documentation/mvc/auth.puml +++ b/Documentation/mvc/auth.puml @@ -1,28 +1,32 @@ @startuml class AuthController { + +__construct (model : AuthModel) + displayRegister() : HttpResponse - + displayBadFields(viewName : string, fails : array) : HttpResponse - + confirmRegister(request : array) : HttpResponse + + register(request : array,session : MutableSessionHandle) : HttpResponse + displayLogin() : HttpResponse - + confirmLogin() : HttpResponse + + login(request : array , session : MutableSessionHandle) : HttpResponse } AuthController --> "- model" AuthModel class AuthModel { - + register(username : string, password : string, confirmPassword : string, email : string): array - + getAccount(email : string):array + +__construct(gateway : AccountGateway) + + register(username : string, password : string, confirmPassword : string, email : string, failures : array): Account + + generateToken() : string + login(email : string, password : string) } -AuthModel --> "- gateway" AuthGateway +AuthModel --> "- gateway" AccountGateway -class AuthGateway { +class AccountGateway { -con : Connection + +__construct(con : Connection) + + insertAccount(name : string, email : string, hash : string, token : string) : int + + getRowsFromMail(email : string): array + + getHash(email : string) : array + + exists(email : string) : bool + + getAccountFromMail(email : string ): Account + + getAccountFromToken(email : string ): Account - + mailExists(email : string) : bool - + insertAccount(username : string, hash : string, email : string) - + getUserHash(email : string):string - + getAccount (email : string): array } @enduml \ No newline at end of file