|
|
|
@ -69,25 +69,29 @@ class Color {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class AuthController{
|
|
|
|
|
-twig: Environment
|
|
|
|
|
|
|
|
|
|
+ login (request) : int
|
|
|
|
|
+ register (request) : int
|
|
|
|
|
+ displayRegister() : HttpResponse
|
|
|
|
|
+ displayBadFields(viewName : string, fails : array) : HttpResponse
|
|
|
|
|
+ confirmRegister(request : array) : HttpResponse
|
|
|
|
|
+ displayLogin() : HttpResponse
|
|
|
|
|
+ confirmLogin() : HttpResponse
|
|
|
|
|
}
|
|
|
|
|
AuthController --> "- modelAuth" AuthModel
|
|
|
|
|
AuthController --> "- model" AuthModel
|
|
|
|
|
|
|
|
|
|
class AuthModel{
|
|
|
|
|
+ validationRegister(username : string, email : string, password : string)
|
|
|
|
|
+ validationLogin (username : string, email : string, password : string)
|
|
|
|
|
|
|
|
|
|
+ register(username : string, password : string, confirmPassword : string, email : string): array
|
|
|
|
|
+ getUserFields(email : string):array
|
|
|
|
|
+ login(email : string, password : string)
|
|
|
|
|
}
|
|
|
|
|
AuthModel --> "- gateway" AuthGateway
|
|
|
|
|
|
|
|
|
|
class AuthGateway{
|
|
|
|
|
-con : Connection
|
|
|
|
|
|
|
|
|
|
+ insert(mail : string, password : string)
|
|
|
|
|
+ isAccountEqual(mail : string, password : string)
|
|
|
|
|
+ mailExist(email : string) : bool
|
|
|
|
|
+ insertAccount(username : string, hash : string, email : string)
|
|
|
|
|
+ getUserHash(email : string):string
|
|
|
|
|
+ getUserFields (email : string): array
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@enduml
|