[geeklog-cvs] geeklog-2/public_html/server/A_and_A AAServiceUser.class.php,1.1,1.2
geeklog-cvs-admin at lists.geeklog.net
geeklog-cvs-admin at lists.geeklog.net
Fri Jul 11 16:37:25 EDT 2003
Update of /usr/cvs/geeklog/geeklog-2/public_html/server/A_and_A
In directory internal.geeklog.net:/tmp/cvs-serv29321
Modified Files:
AAServiceUser.class.php
Log Message:
This file is quite broke but checking it in from work so I can get it checked out on laptop when I get home.
Index: AAServiceUser.class.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-2/public_html/server/A_and_A/AAServiceUser.class.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** AAServiceUser.class.php 11 Jan 2003 05:58:38 -0000 1.1
--- AAServiceUser.class.php 11 Jul 2003 20:37:23 -0000 1.2
***************
*** 1,8 ****
<?php
! //require_once(dirname(__FILE__) . '/../common/AAException.class.php');
! require_once('/home/tony/geeklog2_main/lib/A_and_A/common/AAException.class.php');
! //require_once(dirname(__FILE__) . '/../server/AAProviderFactory.class.php');
! require_once('AAProviderFactory.class.php');
/**
--- 1,21 ----
<?php
! /* Reminder: always indent with 4 spaces (no tabs). */
! /**
! * Enterprise Authentication & Authorization Service (A&A)
! *
! * The license for this software is yet to be determined. In the meantime,
! * all rights are reserved. Use of this software is not permitted without
! * the expressed written consent of Tony Bibbs
! *
! * @author Tony Bibbs <tony at geeklog.net>
! * @copyright Tony Bibbs 2003
! * @version $Id$
! *
! */
!
! require_once 'A_and_A/common/AAException.class.php';
!
! require_once 'AAProviderFactory.class.php';
/**
***************
*** 17,31 ****
*
*/
! class AAServiceUser {
! var $exception = '';
! var $_userId;
! var $_userName = '';
! var $_appId = '';
! var $_empId = '';
! var $_password = '';
! var $_lastPWChange;
! var $_accountLocked = true;
! var $_privileges;
! var $_groups;
/**
--- 30,45 ----
*
*/
! class AAServiceUser implements AAServiceInterface {
! private $_userId;
! private $_userName = '';
! private $_appId = '';
! private $_empId = '';
! private $_password = '';
! private $_lastPWChange;
! private $_accountLocked = true;
! private $_privileges;
! private $_groups;
! public $exception = '';
!
/**
***************
*** 33,66 ****
*
*/
! function AAServiceUser()
{
}
! /**
! * This will authenticate the user
! *
! * @param string $appId Application ID
! * @param string $userId User ID
! * @param string $password Password
! * @return AAServiceUser|AAException User object or an exception
! *
! */
! function &authenticate($appId, $userName, $password)
{
// make sure we got all the arguments
! if (empty($appId) OR empty($userName) OR empty($password)) {
$exception = new AAException(INSUFFICIENT_DATA_EXCEPTION);
$exception->setMessage('appId, userName or password was empty in authenticate()');
return $exception;
! }
// get authentication provider
! $authProvider = &AAProviderFactory::getProvider($appId);
// try authenticating to the provider
! $user = &$authProvider->authenticate($appId, $userName, $password);
!
! return $user;
}
--- 47,69 ----
*
*/
! function __construct()
{
}
! public function authenticate($appId, $userName, $userPass)
{
// make sure we got all the arguments
! /*if (empty($appId) OR empty($userName) OR empty($userPass)) {
$exception = new AAException(INSUFFICIENT_DATA_EXCEPTION);
$exception->setMessage('appId, userName or password was empty in authenticate()');
return $exception;
! }*/
// get authentication provider
! $authProvider = AAProviderFactory::getProvider($appId);
// try authenticating to the provider
! return $authProvider->authenticate($appId, $userName, $userPass);
}
***************
*** 73,77 ****
*
*/
! function authorize($authCode)
{
foreach ($this->_privileges as $curPriv) {
--- 76,80 ----
*
*/
! public function authorize($authCode)
{
foreach ($this->_privileges as $curPriv) {
More information about the geeklog-cvs
mailing list