auth conception fixed
continuous-integration/drone/push Build is passing Details

pull/38/head
Samuel 1 year ago
parent 1bf3dfa3b6
commit 5bcee0b19b

@ -1,28 +1,32 @@
@startuml @startuml
class AuthController { class AuthController {
+__construct (model : AuthModel)
+ displayRegister() : HttpResponse + displayRegister() : HttpResponse
+ displayBadFields(viewName : string, fails : array) : HttpResponse + register(request : array,session : MutableSessionHandle) : HttpResponse
+ confirmRegister(request : array) : HttpResponse
+ displayLogin() : HttpResponse + displayLogin() : HttpResponse
+ confirmLogin() : HttpResponse + login(request : array , session : MutableSessionHandle) : HttpResponse
} }
AuthController --> "- model" AuthModel AuthController --> "- model" AuthModel
class AuthModel { class AuthModel {
+ register(username : string, password : string, confirmPassword : string, email : string): array +__construct(gateway : AccountGateway)
+ getAccount(email : string):array + register(username : string, password : string, confirmPassword : string, email : string, failures : array): Account
+ generateToken() : string
+ login(email : string, password : string) + login(email : string, password : string)
} }
AuthModel --> "- gateway" AuthGateway AuthModel --> "- gateway" AccountGateway
class AuthGateway { class AccountGateway {
-con : Connection -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 @enduml
Loading…
Cancel
Save