Authentication

Contracts

ContactAuthenticationRepositoryContract

The ContactAuthenticationRepositoryContract is the interface for the authentication repository. This interface allows to authenticate users in the client (store) by email and password or by contact ID and password. The interface also provides a method for logging out users from the client (store).

Namespace

Plenty\Modules\Authentication\Contracts

Methods

public authenticateWithContactEmail(string $contactEmail, string $password):void
Parameters
string $contactEmail The email address of the contact of the user
string $password The password of the user
public authenticateWithContactId(int $contactId, string $password):void
Parameters
int $contactId The ID of the contact of the user
string $password The password of the user
public authenticateWithPlentyId(int $plentyId, string $password):void
Parameters
int $plentyId The PlentyId of the plenty system of the user
string $password The password of the user
public logout():void

Events

AfterAccountAuthentication

The event is triggered after a user is authenticated in the client (store).

Namespace

Plenty\Modules\Authentication\Events

Methods

public isSuccessful():bool
public getAccountContact():Contact

AfterAccountContactLogout

The event is triggered after a user is logged out from the client (store).

Namespace

Plenty\Modules\Authentication\Events

Models

User

The user authentication model

Namespace

Plenty\Modules\Authentication\Models

Properties

Type Name Description
int id The ID of the user
pwd
pwd_md5
string timezone
string password The password of the user
user The login name of the user
array roles

Methods

public toArray()

Returns this model as an array.