Source for file jIAuthDriver.iface.php

Documentation is available at jIAuthDriver.iface.php

  1. <?php
  2. /**
  3. @package    jelix
  4. @subpackage auth
  5. @author     Laurent Jouanneau
  6. @contributor Frédéric Guillot, Antoine Detante, Julien Issler
  7. @copyright   2005-2008 Laurent Jouanneau, 2007 Frédéric Guillot, 2007 Antoine Detante
  8. @copyright   2007 Julien Issler
  9. *
  10. */
  11.  
  12. /**
  13.  * interface for auth drivers
  14.  * @package    jelix
  15.  * @subpackage auth
  16.  * @static
  17.  */
  18. interface jIAuthDriver {
  19.     /**
  20.      * constructor
  21.      * @param array $params driver parameters, written in the ini file of the auth plugin
  22.      */
  23.     function __construct($params);
  24.  
  25.     /**
  26.      * creates a new user object, with some first data..
  27.      * Careful : it doesn't create a user in a database for example. Just an object.
  28.      * @param string $login the user login
  29.      * @param string $password the user password
  30.      * @return object the returned object depends on the driver
  31.      */
  32.     public function createUserObject($login$password);
  33.  
  34.     /**
  35.     * store a new user.
  36.     *
  37.     * It create the user in a database for example
  38.     * should be call after a call of createUser and after setting some of its properties...
  39.     * @param object $user the user data container
  40.     */
  41.     public function saveNewUser($user);
  42.  
  43.     /**
  44.      * Erase user data of the user $login
  45.      * @param string $login the login of the user to remove
  46.      */
  47.     public function removeUser($login);
  48.  
  49.     /**
  50.     * save updated data of a user
  51.     * warning : should not save the password !
  52.     * @param object $user the user data container
  53.     */
  54.     public function updateUser($user);
  55.  
  56.     /**
  57.      * return user data corresponding to the given login
  58.      * @param string $login the login of the user
  59.      * @return object the user data container
  60.      */
  61.     public function getUser($login);
  62.  
  63.     /**
  64.      * construct the user list
  65.      * @param string $pattern '' for all users
  66.      * @return array array of user object
  67.      */
  68.     public function getUserList($pattern);
  69.  
  70.     /**
  71.      * change a user password
  72.      *
  73.      * @param string $login the login of the user
  74.      * @param string $newpassword 
  75.      */
  76.     public function changePassword($login$newpassword);
  77.  
  78.     /**
  79.      * verify that the password correspond to the login
  80.      * @param string $login the login of the user
  81.      * @param string $password the password to test
  82.      * @return object|false
  83.      */
  84.     public function verifyPassword($login$password);
  85. }

Documentation generated on Thu, 22 Mar 2012 22:16:08 +0100 by phpDocumentor 1.4.3