AuthenticationService
This service class contains various methods for authenticating customers and related tasks.
All public functions are available in the Twig template renderer.
Namespace
IO\Services
Type | Name | Description |
---|---|---|
|
The repository used for authenticating contacts |
|
|
The repository used for storing data in the session |
|
|
This service is used for various tasks relating to customers |
|
|
Methods
public __construct($contactAuthRepository, $sessionStorageRepository, $customerService)
AuthenticationService constructor.
Type |
Name |
Description |
|
The repository used for authenticating contacts |
|
|
The repository used for storing data in the session |
|
|
This service is used for various tasks relating to customers |
public login($email, $password):int
Perform the login with email and password
Type |
Name |
Description |
|
Contains the customers email address |
|
|
Contains the password used for this login attempt |
public loginWithContactId($contactId, $password)
Perform the login with customer ID and password
Type |
Name |
Description |
|
Contains a id linked to a specific customer |
|
|
Contains the password used for this login attempt |
public logout()
Log out the customer
public checkPassword($password):bool
Check if a password is valid. The customer is logged in as a side effect, if password is valid
Type |
Name |
Description |
|
Contains the password |
public isLoggedIn():bool
Check if the current user is logged in.