phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] phpgwapi/inc class.auth.inc.php, 1.11 class.auth_sqls


From: fipsfuchs
Subject: [Phpgroupware-cvs] phpgwapi/inc class.auth.inc.php, 1.11 class.auth_sqlssl.inc.php, 1.8 class.auth_ntlm.inc.php, 1.3 class.auth_nis.inc.php, 1.6 class.auth_ldap.inc.php, 1.21 class.auth_mail.inc.php, 1.14 class.auth_sql.inc.php, 1.16 class.auth_http.inc.php, 1.10
Date: Tue, 22 Mar 2005 15:53:00 +0100

Update of phpgwapi/inc

Modified Files:
     Branch: MAIN
            class.auth.inc.php lines: +55 -6
Removed Files:
     Branch: MAIN
            class.auth_sqlssl.inc.php
            class.auth_ntlm.inc.php
            class.auth_nis.inc.php
            class.auth_ldap.inc.php
            class.auth_mail.inc.php
            class.auth_sql.inc.php
            class.auth_http.inc.php

Log Message:
auth exchange and auth ads added

====================================================
Index: phpgwapi/inc/class.auth.inc.php
diff -u phpgwapi/inc/class.auth.inc.php:1.10 
phpgwapi/inc/class.auth.inc.php:1.11
--- phpgwapi/inc/class.auth.inc.php:1.10        Thu Dec 30 06:47:30 2004
+++ phpgwapi/inc/class.auth.inc.php     Tue Mar 22 14:53:58 2005
@@ -2,18 +2,67 @@
        /**
        * Authentication loader
        * @author Dan Kuykendall <address@hidden>
+       * @author Philipp Kamps <address@hidden>
        * @copyright Copyright (C) 2001-2004 Free Software Foundation, Inc 
http://www.fsf.org/
        * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General 
Public License
        * @package phpgwapi
        * @subpackage accounts
        */

-       if (empty($GLOBALS['phpgw_info']['server']['auth_type']))
-       {
-               $GLOBALS['phpgw_info']['server']['auth_type'] = 'sql';
-       }
        /**
-       * Include specific authentication method
+       * Class for handling authorization
+       *
+       * @package phpgwapi
+       * @subpackage acounts
+       * @abstract
        */
-       
include(PHPGW_API_INC.'/class.auth_'.$GLOBALS['phpgw_info']['server']['auth_type'].'.inc.php');
+       class auth
+       {
+
+               /**
+               * Standard constructor
+               *
+               */
+               function auth()
+               {
+                       include_once(PHPGW_API_INC . 
'/auth/class.auth_.inc.php');
+
+                       switch($GLOBALS['phpgw_info']['server']['auth_type'])
+                       {
+                               case 'http':
+                               include_once(PHPGW_API_INC . 
'/auth/class.auth_http.inc.php');
+                               $this = new Auth_http();
+                               break;
+
+                               case 'ldap':
+                               include_once(PHPGW_API_INC . 
'/auth/class.auth_ldap.inc.php');
+                               $this = new Auth_ldap();
+                               break;
+
+                               case 'mail':
+                               include_once(PHPGW_API_INC . 
'/auth/class.auth_mail.inc.php');
+                               $this = new Auth_mail();
+                               break;
+
+                               case 'nis':
+                               include_once(PHPGW_API_INC . 
'/auth/class.auth_nis.inc.php');
+                               $this = new Auth_nis();
+                               break;
+
+                               case 'ntlm':
+                               include_once(PHPGW_API_INC . 
'/auth/class.auth_ntlm.inc.php');
+                               $this = new Auth_ntlm();
+                               break;
+
+                               case 'sqlssl':
+                               include_once(PHPGW_API_INC . 
'/auth/class.auth_sqlssl.inc.php');
+                               $this = new Auth_sqlssl();
+                               break;
+
+                               default:
+                               include_once(PHPGW_API_INC . 
'/auth/class.auth_sql.inc.php');
+                               $this = new Auth_sql();
+                       }
+               }
+       }
 ?>






reply via email to

[Prev in Thread] Current Thread [Next in Thread]