|
dolibarr
13.0.2
|
API that allows to log in with an user account. More...
Public Member Functions | |
| __construct () | |
| Constructor of the class. | |
| index ($login, $password, $entity= '', $reset=0) | |
| Login. More... | |
API that allows to log in with an user account.
Definition at line 26 of file api_login.class.php.
| Login::index | ( | $login, | |
| $password, | |||
$entity = '', |
|||
$reset = 0 |
|||
| ) |
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 token (DOLAPIKEY) can be found/set on the user page.
| string | $login | User login |
| string | $password | User password |
| string | $entity | Entity (when multicompany module is used). '' means 1=first company. |
| int | $reset | Reset 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) |
| RestException | 403 Access denied |
| RestException | 500 System error |
GET / POST /
Definition at line 57 of file api_login.class.php.
References checkLoginPassEntity(), db, dol_hash(), and dol_syslog().