AuthenticationView

It's a view that displays a login and registration form

Constructor

new AuthenticationView(authenticationService)

Parameters:
NameTypeDescription
authenticationServicefunction

Authentication service

Classes

AuthenticationView

Members

authenticationService :AuthenticationService

domElement :HTMLElement

Type:
  • HTMLElement

Methods

deleteValuesForm(forms)

Delete the values of the form

Parameters:
NameTypeDescription
formsArray.<HTMLFormElement>

Array of form

isVisible() → {boolean}

Check if the window is visible

Returns:

True if the window is visible

Type: 
boolean

(async) logInFunction()

It verifies that the login and password fields are not empty, then it calls the login function of the authentication service

(async) registerFunction()

Register a new user

verifyNotEmptyValuesForm(forms) → {boolean}

Parameters:
NameTypeDescription
formsArray.<HTMLFormElement>

Array of forms

Returns:

True if all form values aren't empty

Type: 
boolean

verifymail() → {boolean}

Check if the mail is correct

Returns:

True if the the mail if correct

Type: 
boolean