dolibarr  7.0.0-beta
Public Member Functions | List of all members
Login Class Reference

API that allows to log in with an user account. More...

Public Member Functions

 index ($login, $password, $entity='', $reset=0)
 Login. More...
 

Detailed Description

API that allows to log in with an user account.

Definition at line 26 of file api_login.class.php.

Member Function Documentation

Login::index (   $login,
  $password,
  $entity = '',
  $reset = 0 
)

Login.

Request the API token for a couple username / password. Using method POST is recommanded for security reasons (method GET is often logged by default by web servers with parameters so with login and pass into server log file). Both methods are provided for developer conveniance. Best is to not use at all the login API method and enter directly the "DOLAPIKEY" into field at the top right of page. Note: The API key (DOLAPIKEY) can be found/set on the user page.

Parameters
string$loginUser login
string$passwordUser password
string$entityEntity (when multicompany module is used). '' means 1=first company.
int$resetReset token (0=get current token, 1=ask a new token and canceled old token. This means access using current existing API token of user will fails: new token will be required for new access)
Returns
array Response status and user token
Exceptions
200
403
500GET / POST /

Definition at line 54 of file api_login.class.php.

References checkLoginPassEntity(), dol_hash(), and dol_syslog().


The documentation for this class was generated from the following file: