[geeklog-cvs] Auth_Enterprise/Server AEBaseCommand.class.php,1.1.1.1,1.2 AEIncludes.php,1.1.1.1,1.2 AEProviderFactory.class.php,1.1.1.1,1.2 AEServerConfig.php,1.1.1.1,1.2 AEServiceUser.class.php,1.1.1.1,1.2 includes.php,1.1.1.1,1.2 config.php,1.1.1.1,NONE

tony at geeklog.net tony at geeklog.net
Tue Oct 28 19:52:42 EST 2003


Update of /usr/cvs/geeklog/Auth_Enterprise/Server
In directory geeklog_prod:/tmp/cvs-serv1664/Server

Modified Files:
	AEBaseCommand.class.php AEIncludes.php 
	AEProviderFactory.class.php AEServerConfig.php 
	AEServiceUser.class.php includes.php 
Removed Files:
	config.php 
Log Message:
Authenticate method nearly complete using XML_RPC

Index: AEBaseCommand.class.php
===================================================================
RCS file: /usr/cvs/geeklog/Auth_Enterprise/Server/AEBaseCommand.class.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** AEBaseCommand.class.php	23 Oct 2003 14:17:34 -0000	1.1.1.1
--- AEBaseCommand.class.php	29 Oct 2003 00:52:40 -0000	1.2
***************
*** 1,54 ****
  <?php
! 
! /**
! * Auth_Enterprise
! *
! * This source file is subject to version 2.02 of the PHP license,
! * that is bundled with this package in the file LICENSE, and is
! * available at through the world-wide-web at
! * http://www.php.net/license/2_02.txt.
! * If you did not receive a copy of the PHP license and are unable to
! * obtain it through the world-wide-web, please send a note to
! * license at php.net so we can mail you a copy immediately.
! *
! * @author Tony Bibbs <tony at geeklog.net>
! * @copyright 2003
! * @version $Id$
! *
! */
! 
! /**
! * Abstract class that represents the base of all commands in the
! * Auth_Enterprise service.  Nothing is really implemented here yet
! * but it could be useful in the future.
! *
! * @author Tony Bibbs <tony at geeklog.net>
! * @package net.geeklog.auth_enterprise.server
! *
  */
! class AEBaseCommand {
!     /**
!     * Constructor
!     *
!     * @author Tony Bibbs <tony at geeklog.net>
!     * @access public
!     *
!     */
!     function AEBaseCommand()
!     {
!     }
!     
!     /**
!     * This is the method the Server controllers will call to
!     * being command exection
!     *
!     * @author Tony Bibbs <tony at geeklog.net>
!     * @access public
!     *
!     */
!     function execute()
!     {
      }
  }
- 
  ?>
--- 1,50 ----
  <?php
! /**
! * Auth_Enterprise
! *
! * This source file is subject to version 2.02 of the PHP license,
! * that is bundled with this package in the file LICENSE, and is
! * available at through the world-wide-web at
! * http://www.php.net/license/2_02.txt.
! * If you did not receive a copy of the PHP license and are unable to
! * obtain it through the world-wide-web, please send a note to
! * license at php.net so we can mail you a copy immediately.
! *
! * @author Tony Bibbs <tony at geeklog.net>
! * @copyright 2003
! * @version $Id$
! *
  */
! /**
! * Abstract class that represents the base of all commands in the
! * Auth_Enterprise service.  Nothing is really implemented here yet
! * but it could be useful in the future.
! *
! * @author Tony Bibbs <tony at geeklog.net>
! * @package net.geeklog.auth_enterprise.server
! *
! */
! class AEBaseCommand {
!     /**
!     * Constructor
!     *
!     * @author Tony Bibbs <tony at geeklog.net>
!     * @access public
!     *
!     */
!     function AEBaseCommand()
!     {
      }
+     /**
+     * This is the method the Server controllers will call to
+     * being command exection
+     *
+     * @author Tony Bibbs <tony at geeklog.net>
+     * @access public
+     *
+     */
+     function execute()
+     {
+     }
  }
  ?>

Index: AEIncludes.php
===================================================================
RCS file: /usr/cvs/geeklog/Auth_Enterprise/Server/AEIncludes.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** AEIncludes.php	23 Oct 2003 14:17:34 -0000	1.1.1.1
--- AEIncludes.php	29 Oct 2003 00:52:40 -0000	1.2
***************
*** 1,38 ****
  <?php
! 
! /**
! * Auth_Enterprise Server Common Include File
! *
! * Files needed by all server implementations should be included here
! *
! * This source file is subject to version 2.02 of the PHP license,
! * that is bundled with this package in the file LICENSE, and is
! * available at through the world-wide-web at
! * http://www.php.net/license/2_02.txt.
! * If you did not receive a copy of the PHP license and are unable to
! * obtain it through the world-wide-web, please send a note to
! * license at php.net so we can mail you a copy immediately.
! *
! * @author Tony Bibbs <tony at geeklog.net>
! * @copyright 2003
! * @version $Id$
! *
! */
! 
! /**
! * Bring in Auth_Enterprise's Utility class
  */
  require_once 'Auth_Enterprise/AEUtility.class.php';
! 
! /**
! * Bring in the Server's configuration file
! */
  require_once 'Auth_Enterprise/Server/AEServerConfig.php';
! 
! /**
! * Bring in constants that are shared between the Auth_Enterprise
! * Service and the Client
! */
  require_once 'Auth_Enterprise/Common/AEConstants.php';
- 
  ?>
--- 1,33 ----
  <?php
! /**
! * Auth_Enterprise Server Common Include File
! *
! * Files needed by all server implementations should be included here
! *
! * This source file is subject to version 2.02 of the PHP license,
! * that is bundled with this package in the file LICENSE, and is
! * available at through the world-wide-web at
! * http://www.php.net/license/2_02.txt.
! * If you did not receive a copy of the PHP license and are unable to
! * obtain it through the world-wide-web, please send a note to
! * license at php.net so we can mail you a copy immediately.
! *
! * @author Tony Bibbs <tony at geeklog.net>
! * @copyright 2003
! * @version $Id$
! *
  */
+ /**
+ * Bring in Auth_Enterprise's Utility class
+ */
  require_once 'Auth_Enterprise/AEUtility.class.php';
! /**
! * Bring in the Server's configuration file
! */
  require_once 'Auth_Enterprise/Server/AEServerConfig.php';
! /**
! * Bring in constants that are shared between the Auth_Enterprise
! * Service and the Client
! */
  require_once 'Auth_Enterprise/Common/AEConstants.php';
  ?>

Index: AEProviderFactory.class.php
===================================================================
RCS file: /usr/cvs/geeklog/Auth_Enterprise/Server/AEProviderFactory.class.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** AEProviderFactory.class.php	23 Oct 2003 14:17:34 -0000	1.1.1.1
--- AEProviderFactory.class.php	29 Oct 2003 00:52:40 -0000	1.2
***************
*** 1,62 ****
  <?php
! 
! /**
! * Auth_Enterprise
! *
! * This source file is subject to version 2.02 of the PHP license,
! * that is bundled with this package in the file LICENSE, and is
! * available at through the world-wide-web at
! * http://www.php.net/license/2_02.txt.
! * If you did not receive a copy of the PHP license and are unable to
! * obtain it through the world-wide-web, please send a note to
! * license at php.net so we can mail you a copy immediately.
! *
! * @author Tony Bibbs <tony at geeklog.net>
! * @copyright 2003
! * @version $Id$
! *
! */
! 
! /**
! * Auth_Enteprise's Provider Factory
! *
! * This class simply builds an instance of the right provider for
! * the given application ID.
! *
! * @author Tony Bibbs <tony at geeklog.net>
! * @package net.geeklog.auth_enterprise.server
! *
  */
! class AEProviderFactory {
!     /**
!     * Gets an instance of the provider that handles authentication and
!     * authorization requests for the given application
!     *
!     * @author Tony Bibbs <tony at geeklog.net>
!     * @access public
!     * @param string $appId ID of the application to get the provider for
!     * @return object A provider instance
!     *
!     */
!     function &getProvider($appId)
!     {
          global $gConf;
!         
!         AEUtility::logMessage('AEProvider Factory got ' . $appId . ' as the app ID',__FILE__,__LINE__);
!         $provider = $gConf['providerMapping'][$appId];
!         AEUtility::logMessage("AEProvider got $provider as the provider",__FILE__,__LINE__);
!         if (empty($provider)) {
!             AEUtility::logMessage("A provider was not found for application, $appId.  Please verify the ID
!                                   and the setting in the providerMapping in the Auth_Enterprise configuration file",
!                                   __FILE__, __LINE__, PEAR_LOG_ERROR);
!             //return PEAR::raiseError();
          }
!         
!         $fileName = 'Auth_Enterprise/Server/providers/' . $provider . '.class.php';
!         AEUtility::logMessage("Got $fileName as the provider file",__FILE__,__LINE__);
!         require_once $fileName;
!         return new $provider();
!     }
  }
- 
  ?>
--- 1,57 ----
  <?php
! /**
! * Auth_Enterprise
! *
! * This source file is subject to version 2.02 of the PHP license,
! * that is bundled with this package in the file LICENSE, and is
! * available at through the world-wide-web at
! * http://www.php.net/license/2_02.txt.
! * If you did not receive a copy of the PHP license and are unable to
! * obtain it through the world-wide-web, please send a note to
! * license at php.net so we can mail you a copy immediately.
! *
! * @author Tony Bibbs <tony at geeklog.net>
! * @copyright 2003
! * @version $Id$
! *
  */
! /**
! * Auth_Enteprise's Provider Factory
! *
! * This class simply builds an instance of the right provider for
! * the given application ID.
! *
! * @author Tony Bibbs <tony at geeklog.net>
! * @package net.geeklog.auth_enterprise.server
! *
! */
! class AEProviderFactory {
!     /**
!     * Gets an instance of the provider that handles authentication and
!     * authorization requests for the given application
!     *
!     * @author Tony Bibbs <tony at geeklog.net>
!     * @access public
!     * @param string $appId ID of the application to get the provider for
!     * @return object A provider instance
!     *
!     */
!     function &getProvider($appId)
!     {
          global $gConf;
!         AEUtility::logMessage('AEProvider Factory got ' . $appId . ' as the app ID',__FILE__,__LINE__);
!         $provider = $gConf['providerMapping'][$appId];
!         AEUtility::logMessage("AEProvider got $provider as the provider",__FILE__,__LINE__);
!         if (empty($provider)) {
!             AEUtility::logMessage("A provider was not found for application, $appId.  Please verify the ID
!                                   and the setting in the providerMapping in the Auth_Enterprise configuration file",
!                                   __FILE__, __LINE__, PEAR_LOG_ERROR);
!             //return PEAR::raiseError();
          }
!         $fileName = 'Auth_Enterprise/Server/providers/' . $provider . '.class.php';
!         AEUtility::logMessage("Got $fileName as the provider file",__FILE__,__LINE__);
!         require_once $fileName;
!         return new $provider();
!     }
  }
  ?>

Index: AEServerConfig.php
===================================================================
RCS file: /usr/cvs/geeklog/Auth_Enterprise/Server/AEServerConfig.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** AEServerConfig.php	23 Oct 2003 14:17:34 -0000	1.1.1.1
--- AEServerConfig.php	29 Oct 2003 00:52:40 -0000	1.2
***************
*** 1,53 ****
  <?php
! 
! /**
! * Auth_Enterprise Server Configuration File
! *
! * This source file is subject to version 2.02 of the PHP license,
! * that is bundled with this package in the file LICENSE, and is
! * available at through the world-wide-web at
! * http://www.php.net/license/2_02.txt.
! * If you did not receive a copy of the PHP license and are unable to
! * obtain it through the world-wide-web, please send a note to
! * license at php.net so we can mail you a copy immediately.
! *
! * @author Tony Bibbs <tony at geeklog.net>
! * @package net.geeklog.auth_enterprise.server
! * @copyright 2003
! * @version $Id$
! *
! */
! 
! /**
! * Sets the logging level used on the server.  See the top of PEAR's Log.php
! * to see all the valid values
! * @const AE_LOGLEVEL
  */
! define('AE_LOGLEVEL', PEAR_LOG_DEBUG);
! 
  define('AE_LOGFILE', 'C:/Program Files/Apache Group/Apache/htdocs/projects/Auth_Enterprise/ServerLog.txt');
! 
! // List of valid providers
  define('AE_PROVIDER_PEAR_DB','AEPearDB');
! define('AE_PROVIDER_LDAP', 'AELDAP');
! 
! // This sets the default provider
! $gConf['defaultProvider'] = AE_PROVIDER_PEAR_DB;
! 
! // This maps application to their provider.
! $gConf['providerMapping'] = array(
! 	'AE_TEST_APP_PEAR' => AE_PROVIDER_PEAR_DB,
! 	'AE_TEST_APP_LDAP' => AE_PROVIDER_LDAP
  );
! 
! /**
! * Settings for the PEAR DB provider
! *
! **/
! $gConf[AE_PROVIDER_PEAR_DB]['dbms']       = 'mysql';
! $gConf[AE_PROVIDER_PEAR_DB]['dbhost']     = 'localhost';
! $gConf[AE_PROVIDER_PEAR_DB]['dbname']     = 'Auth_Enterprise';
! $gConf[AE_PROVIDER_PEAR_DB]['dbuser']     = 'root';
  $gConf[AE_PROVIDER_PEAR_DB]['dbpassword'] = 'foo';
! 
! ?>
--- 1,57 ----
  <?php
! /**
! * Auth_Enterprise Server Configuration File
! *
! * This source file is subject to version 2.02 of the PHP license,
! * that is bundled with this package in the file LICENSE, and is
! * available at through the world-wide-web at
! * http://www.php.net/license/2_02.txt.
! * If you did not receive a copy of the PHP license and are unable to
! * obtain it through the world-wide-web, please send a note to
! * license at php.net so we can mail you a copy immediately.
! *
! * @author Tony Bibbs <tony at geeklog.net>
! * @package net.geeklog.auth_enterprise.server
! * @copyright 2003
! * @version $Id$
! *
  */
! /**
! * Sets the logging level used on the server.  See the top of PEAR's Log.php
! * to see all the valid values
! * @const AE_LOGLEVEL
! */
! define('AE_LOGLEVEL', PEAR_LOG_DEBUG);
! 
! /**
! * Sets the file we will log to
! * @const AE_LOGFILE
! */
  define('AE_LOGFILE', 'C:/Program Files/Apache Group/Apache/htdocs/projects/Auth_Enterprise/ServerLog.txt');
! /**
! * The database provider for Auth_Enteprise (uses PEAR::DB)
! * @const AE_PROVIDER_PEAR_DB
! */
  define('AE_PROVIDER_PEAR_DB','AEPearDB');
! /**
! * The LDAP provider for Auth_Enterprise (not implemented)
! * @const AE_PROVIDER_LDAP
! */
! define('AE_PROVIDER_LDAP', 'AELDAP');
! 
! // This sets the default provider
$gConf['defaultProvider'] = AE_PROVIDER_PEAR_DB;
! // This maps application to their provider.
! $gConf['providerMapping'] = array(
! 	'AE_TEST_APP_PEAR' => AE_PROVIDER_PEAR_DB,
! 	'AE_TEST_APP_LDAP' => AE_PROVIDER_LDAP
  );
! /**
! * Settings for the PEAR DB provider
! *
! **/
! $gConf[AE_PROVIDER_PEAR_DB]['dbms']       = 'mysql';
! $gConf[AE_PROVIDER_PEAR_DB]['dbhost']     = 'localhost';
! $gConf[AE_PROVIDER_PEAR_DB]['dbname']     = 'Auth_Enterprise';
! $gConf[AE_PROVIDER_PEAR_DB]['dbuser']     = 'root';
  $gConf[AE_PROVIDER_PEAR_DB]['dbpassword'] = 'foo';
! ?>
\ No newline at end of file

Index: AEServiceUser.class.php
===================================================================
RCS file: /usr/cvs/geeklog/Auth_Enterprise/Server/AEServiceUser.class.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** AEServiceUser.class.php	23 Oct 2003 14:17:35 -0000	1.1.1.1
--- AEServiceUser.class.php	29 Oct 2003 00:52:40 -0000	1.2
***************
*** 1,317 ****
  <?php
! 
! /**
! * Auth_Enterprise
! *
! * This source file is subject to version 2.02 of the PHP license,
! * that is bundled with this package in the file LICENSE, and is
! * available at through the world-wide-web at
! * http://www.php.net/license/2_02.txt.
! * If you did not receive a copy of the PHP license and are unable to
! * obtain it through the world-wide-web, please send a note to
! * license at php.net so we can mail you a copy immediately.
! *
! * @author Tony Bibbs <tony at geeklog.net>
! * @copyright 2003
! * @version $Id$
! *
! */
! 
! /**
! * The service interface
! */
! require_once 'Auth_Enterprise/Common/AEServiceInterface.class.php';
! 
! /**
! * Auth Enterprise's Group class
  */
  require_once 'Auth_Enterprise/Common/AEGroup.class.php';
! 
! /**
! * Auth_Enteprise Service User Class.  This services as a proxy to the
! * various providers that are supported.
! *
! * @author Tony Bibbs <tony at geeklog.net>
! * @package net.geeklog.auth_enterprise.common
! *
! */
! class AEServiceUser extends AEServiceInterface {
!     var $_userId = null;
!     var $_userName = null;
!     var $_appId = null;
!     var $_password = null;
!     var $_accountLocked = null;
!     var $_failedAttempts = null;
!     var $_lastPWChange = null;
!     var $_privileges = null;
      var $_groups = null;
!     
!     /**
!     * Authenticates a user to an application
!     *
!     * @author Tony Bibbs <tony at geeklog.net>
!     * @access public
!     *
!     */
!     function authenticate($appId, $userId, $password)
!     {
!         $provider = AEProviderFactory::getProvider($appId);
!         $user = $provider->authenticate($appId, $userId, $password);
!         if (PEAR::isError($user)) {
!             AEUtility::logMessage($user->toString(), __FILE__, __LINE__, PEAR_LOG_ERROR);
!         }
!     }
!     
!     /**
!     * Registers a new account with the service
!     *
!     * @author Tony Bibbs <tony at geeklog.net>
!     * @access public
!     *
!     */
!     function createAccount()
!     {
!     }
!     
!     /**
!     * Changes a user's password
!     *
!     * @author Tony Bibbs <tony at geeklog.net>
!     * @access public
!     *
!     */
!     function changePassword()
!     {
!     }
!     
!     /**
!     * Allows an application level admin to change a
!     * user's password
!     *
!     * @author Tony Bibbs <tony at geeklog.net>
!     * @access public
!     *
!     */
!     function changePasswordByAdmin()
!     {
!     }
!     
!     /**
!     * Gets the application privileges for a given user
!     *
!     * @author Tony Bibbs <tony at geeklog.net>
!     * @access public
!     *
!     */
!     function getUserPrivileges()
!     {
!     }
!     
!     /**
!     * Sets the application privileges for a given user
!     *
!     * @author Tony Bibbs <tony at geeklog.net>
!     * @access public
!     *
!     */
!     function setUserPrivileges()
!     {
      }
!     
!     /**
!     * Lists all available privileges for a given application
!     *
!     * @author Tony Bibbs <tony at geeklog.net>
!     * @access public
!     *
!     */
!     function listAppPrivileges()
!     {
      }
!     
!     /**
!     * Sets the application ID
!     *
!     * @param    string      $appId      Application ID
!     *
!     */
!     function setAppId($appId)
!     {
!         $this->_appId = $appId;
      }
! 
!     /**
!     * Returns current app ID
!     *
!     * @return   string      Application ID
!     *
!     */
!     function getAppId()
!     {
!         return $this->_appId;
      }
!    
!     /**
!     * Sets the User ID
!     *
!     * @param    string      $empId      User ID
!     *
!     */
!     function setUserId($userId)
!     {
!         $this->_userId = $userId;
      }
! 
!     /**
!     * Returns the current user ID
!     *
!     * @return   string      User ID
!     *
!     */
!     function getUserID()
!     {
!         return $this->_userId;
      }
!     
!     function setUserName($userName)
!     {
!         $this->_userName = $userName;
      }
!     
!     function getUserName()
!     {
!         return $this->_userName;
      }
! 
!     /**
!     * Sets the password for the user
!     *   
!     * @param    string      $password       User's password
!     *
!     */
!     function setPassword($password)
!     {
!         $this->_password = $password;
      }
! 
!     /**
!     * Gets the current password
!     *
!     * @return   string      User's password
!     *
!     */
!     function getPassword()
!     {
!         return $this->_password;
      }
! 
!     function setFailedAttempts($failedAttempts)
!     {
!         $this->_failedAttempts = $failedAttempts;
      }
!     
!     function getFailedAttempts()
!     {
!         return $this->_failedAttempts;
      }
!     
!     /**
!     * Sets unix timestamp when user changed their password last
!     *
!     * @param    string      $lastPWChagneTimeStamp  Unix timestamp
!     *
!     */
!     function setLastPWChange($lastPWChangeTimeStamp)
!     {
!         $this->_lastPWChange = $lastPWChangeTimeStamp;
      }
! 
!     /**
!     * Returns last time password was changed
!     *
!     * @return   string      Unix timestamp
!     *
!     */
!     function getLastPWChange()
!     {
!         $this->_lastPWChange;
      }
! 
!     /**
!     * Sets if the password requires change
!     *
!     * @return   boolean     True of false
!     *
!     */
!     function setPWChangeRequired($switch)
!     {
!         $this->_pwChangeRequired = $switch;
      }
! 
!     /**
!     * Returns if the password has expired or not
!     *
!     * @return   boolean     True of false
!     *
!     */
!     function isPasswordExpired()
!     {
!         return false;
      }
! 
!     /**
!     * Set whether or no the account is locked
!     *
!     * @param    boolean     $switch     True or false
!     *
!     */
!     function setAccountLocked($switch)
!     {
!         $this->_accountLocked = $switch;
      }
! 
!     /**
!     * Returns whether or not the account is locked
!     *
!     * @return   boolean     True of false
!     *
!     */
!     function getAccountLocked()
!     {
!         return $this->_accountLocked;
      }
! 
!     /**
!     * Returns the privilges a user has
!     *
!     * @return   AAPrivilege[]   Array of privileges
!     *
!     */
!     function getPrivileges()
!     {
!         return $this->_privileges;
      }
! 
!     /**
!     * Sets the privileges a user has
!     *
!     * @prarm    array   $privArray  Array of AAPrivilege objects
!     *
!     */
!     function setPrivileges($privArray)
!     {
!         $this->_privileges = $privArray;
      }
!     
!     function setGroups($groupArray)
!     {
!         $this->_groups = $groupArray;
      }
!     
!     function getGroups()
!     {
!         return $this->_groups;
      }
  }
- 
  ?>
--- 1,290 ----
  <?php
! /**
! * Auth_Enterprise
! *
! * This source file is subject to version 2.02 of the PHP license,
! * that is bundled with this package in the file LICENSE, and is
! * available at through the world-wide-web at
! * http://www.php.net/license/2_02.txt.
! * If you did not receive a copy of the PHP license and are unable to
! * obtain it through the world-wide-web, please send a note to
! * license at php.net so we can mail you a copy immediately.
! *
! * @author Tony Bibbs <tony at geeklog.net>
! * @copyright 2003
! * @version $Id$
! *
  */
+ /**
+ * The service interface
+ */
+ require_once 'Auth_Enterprise/Common/AEServiceInterface.class.php';
+ 
+ /**
+ * Auth Enterprise's Group class
+ */
  require_once 'Auth_Enterprise/Common/AEGroup.class.php';
! /**
! * Auth_Enteprise Service User Class.  This services as a proxy to the
! * various providers that are supported.
! *
! * @author Tony Bibbs <tony at geeklog.net>
! * @package net.geeklog.auth_enterprise.common
! *
! */
! class AEServiceUser extends AEServiceInterface {
!     var $_userId = null;
!     var $_userName = null;
!     var $_appId = null;
!     var $_password = null;
!     var $_accountLocked = null;
!     var $_failedAttempts = null;
!     var $_lastPWChange = null;
!     var $_privileges = null;
      var $_groups = null;
!     /**
!     * Authenticates a user to an application
!     *
!     * @author Tony Bibbs <tony at geeklog.net>
!     * @access public
!     *
!     */
!     function authenticate($appId, $userId, $password)
!     {
!         $provider = AEProviderFactory::getProvider($appId);
!         $user = $provider->authenticate($appId, $userId, $password);
!         if (PEAR::isError($user)) {
!             AEUtility::logMessage($user->toString(), __FILE__, __LINE__, PEAR_LOG_ERROR);
!         }
      }
!     /**
!     * Registers a new account with the service
!     *
!     * @author Tony Bibbs <tony at geeklog.net>
!     * @access public
!     *
!     */
!     function createAccount()
!     {
      }
!     /**
!     * Changes a user's password
!     *
!     * @author Tony Bibbs <tony at geeklog.net>
!     * @access public
!     *
!     */
!     function changePassword()
!     {
      }
!     /**
!     * Allows an application level admin to change a
!     * user's password
!     *
!     * @author Tony Bibbs <tony at geeklog.net>
!     * @access public
!     *
!     */
!     function changePasswordByAdmin()
!     {
      }
!     /**
!     * Gets the application privileges for a given user
!     *
!     * @author Tony Bibbs <tony at geeklog.net>
!     * @access public
!     *
!     */
!     function getUserPrivileges()
!     {
      }
!     /**
!     * Sets the application privileges for a given user
!     *
!     * @author Tony Bibbs <tony at geeklog.net>
!     * @access public
!     *
!     */
!     function setUserPrivileges()
!     {
!     }
!     
!     /**
!     * Lists all available privileges for a given application
!     *
!     * @author Tony Bibbs <tony at geeklog.net>
!     * @access public
!     *
!     */
!     function listAppPrivileges()
!     {
!     }
!     
!     /**
!     * Sets the application ID
!     *
!     * @param    string      $appId      Application ID
!     *
!     */
!     function setAppId($appId)
!     {
!         $this->_appId = $appId;
      }
!     /**
!     * Returns current app ID
!     *
!     * @return   string      Application ID
!     *
!     */
!     function getAppId()
!     {
!         return $this->_appId;
      }
!     /**
!     * Sets the User ID
!     *
!     * @param    string      $empId      User ID
!     *
!     */
!     function setUserId($userId)
!     {
!         $this->_userId = $userId;
      }
!     /**
!     * Returns the current user ID
!     *
!     * @return   string      User ID
!     *
!     */
!     function getUserID()
!     {
!         return $this->_userId;
      }
!     function setUserName($userName)
!     {
!         $this->_userName = $userName;
      }
!     function getUserName()
!     {
!         return $this->_userName;
      }
!     /**
!     * Sets the password for the user
!     *   
!     * @param    string      $password       User's password
!     *
!     */
!     function setPassword($password)
!     {
!         $this->_password = $password;
!     }
!     
!     /**
!     * Gets the current password
!     *
!     * @return   string      User's password
!     *
!     */
!     function getPassword()
!     {
!         return $this->_password;
      }
!     function setFailedAttempts($failedAttempts)
!     {
!         $this->_failedAttempts = $failedAttempts;
      }
!     function getFailedAttempts()
!     {
!         return $this->_failedAttempts;
      }
!     /**
!     * Sets unix timestamp when user changed their password last
!     *
!     * @param    string      $lastPWChagneTimeStamp  Unix timestamp
!     *
!     */
!     function setLastPWChange($lastPWChangeTimeStamp)
!     {
!         $this->_lastPWChange = $lastPWChangeTimeStamp;
      }
!     /**
!     * Returns last time password was changed
!     *
!     * @return   string      Unix timestamp
!     *
!     */
!     function getLastPWChange()
!     {
!         $this->_lastPWChange;
      }
!     /**
!     * Sets if the password requires change
!     *
!     * @return   boolean     True of false
!     *
!     */
!     function setPWChangeRequired($switch)
!     {
!         $this->_pwChangeRequired = $switch;
!     }
!     
!     /**
!     * Returns if the password has expired or not
!     *
!     * @return   boolean     True of false
!     *
!     */
!     function isPasswordExpired()
!     {
!         return false;
      }
!     /**
!     * Set whether or no the account is locked
!     *
!     * @param    boolean     $switch     True or false
!     *
!     */
!     function setAccountLocked($switch)
!     {
!         $this->_accountLocked = $switch;
      }
!     /**
!     * Returns whether or not the account is locked
!     *
!     * @return   boolean     True of false
!     *
!     */
!     function getAccountLocked()
!     {
!         return $this->_accountLocked;
      }
!     /**
!     * Returns the privilges a user has
!     *
!     * @return   AAPrivilege[]   Array of privileges
!     *
!     */
!     function getPrivileges()
!     {
!         return $this->_privileges;
      }
!     /**
!     * Sets the privileges a user has
!     *
!     * @prarm    array   $privArray  Array of AAPrivilege objects
!     *
!     */
!     function setPrivileges($privArray)
!     {
!         $this->_privileges = $privArray;
      }
!     function setGroups($groupArray)
!     {
!         $this->_groups = $groupArray;
      }
+     function getGroups()
+     {
+         return $this->_groups;
+     }
  }
  ?>

Index: includes.php
===================================================================
RCS file: /usr/cvs/geeklog/Auth_Enterprise/Server/includes.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** includes.php	23 Oct 2003 14:17:35 -0000	1.1.1.1
--- includes.php	29 Oct 2003 00:52:40 -0000	1.2
***************
*** 1,38 ****
  <?php
! 
! /**
! * Auth_Enterprise Server Common Include File
! *
! * Files needed by all server implementations should be included here
! *
! * This source file is subject to version 2.02 of the PHP license,
! * that is bundled with this package in the file LICENSE, and is
! * available at through the world-wide-web at
! * http://www.php.net/license/2_02.txt.
! * If you did not receive a copy of the PHP license and are unable to
! * obtain it through the world-wide-web, please send a note to
! * license at php.net so we can mail you a copy immediately.
! *
! * @author Tony Bibbs <tony at geeklog.net>
! * @copyright 2003
! * @version $Id$
! *
! */
! 
! /**
! * Bring in the Server's configuration file
! */
  require_once 'Auth_Enterprise/Server/AEServerConfig.php';
! 
! /**
! * Bring in Auth_Enterprise's Utility class
! */
  require_once 'Auth_Enterprise/AEUtility.class.php';
! 
! /**
! * Bring in constants that are shared between the Auth_Enterprise
! * Service and the Client
! */
  require_once 'Auth_Enterprise/Common/AEConstants.php';
- 
  ?>
--- 1,34 ----
  <?php
! /**
! * Auth_Enterprise Server Common Include File
! *
! * Files needed by all server implementations should be included here
! *
! * This source file is subject to version 2.02 of the PHP license,
! * that is bundled with this package in the file LICENSE, and is
! * available at through the world-wide-web at
! * http://www.php.net/license/2_02.txt.
! * If you did not receive a copy of the PHP license and are unable to
! * obtain it through the world-wide-web, please send a note to
! * license at php.net so we can mail you a copy immediately.
! *
! * @author Tony Bibbs <tony at geeklog.net>
! * @copyright 2003
! * @version $Id$
! *
! */
! 
! /**
! * Bring in the Server's configuration file
! */
  require_once 'Auth_Enterprise/Server/AEServerConfig.php';
! /**
! * Bring in Auth_Enterprise's Utility class
! */
  require_once 'Auth_Enterprise/AEUtility.class.php';
! /**
! * Bring in constants that are shared between the Auth_Enterprise
! * Service and the Client
! */
  require_once 'Auth_Enterprise/Common/AEConstants.php';
  ?>

--- config.php DELETED ---





More information about the geeklog-cvs mailing list