Plentymarkets interface documentation

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($contactEmail, $password):void
Parameters

Name

Type

Description

$contactEmail

string

The email address of the contact of the user

$password

string

The password of the user

public authenticateWithContactId($contactId, $password):void
Parameters

Name

Type

Description

$contactId

int

The ID of the contact of the user

$password

string

The password of the user

public authenticateWithPlentyId($plentyId, $password):void
Parameters

Name

Type

Description

$plentyId

int

The PlentyId of the plenty system of the user

$password

string

The password of the user

public authenticateWithToken($token):void
Parameters

Name

Type

Description

$token

string

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():Plenty\Modules\Account\Contact\Models\Contact
Return type: 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
Name Type Description

id

int

The ID of the user

userId

int

The ID of the user

pwd

pwd_md5

email

string

emailHash

string

timezone

string

ticket

int

password

string

The password of the user

user

The login name of the user

username

string

The login name of the user

real_name

string

The full name of the user

lang

string

userClass

int

userRights

array

uiConfig

array

permissions

array

pluginPermissions

array

roles

array

accessControl

array

daysLeftToChangePassword

int

isSupportUser

bool

oauthAccessTokensId

string

Methods
public toArray()

Returns this model as an array.