Methods > glpi.doLogin

Version Comments
1.3.0 No change
1.2.0 No change
0.2.0 Method added

Use GLPI mechanism to authenticate a user

input a hashtable
  • help option to get usage information
  • login_name
  • login_password
  • other parameter will be stored to session (could be used in retrieve_more_data_from_ldap hook)
return a hashtable (if login succeed)
  • id of the user
  • name login
  • realname
  • firstname
  • session (this value must be send to other method to set the user context)

Call example

$ php testxmlrpc.php  --method=glpi.doLogin --help
+ Calling 'glpi.doLogin' on http://localhost//glpi072/plugins/webservices/xmlrpc.php
+ Response: Array
(
    [login_name] => string,mandatory
    [login_password] => string,mandatory
)

$ php testxmlrpc.php  --method=glpi.doLogin --login_password=glpi --login_name=glpi
+ Calling 'glpi.doLogin' on http://localhost//glpi072/plugins/webservices/xmlrpc.php
+ Response: Array
(
    [id] => 6
    [name] => glpi
    [realname] => COLLET
    [firstname] => Remi
    [session] => 161b8klmbqe06v8k283i5hh8j7
)