summaryrefslogtreecommitdiffstats
path: root/etc/inc/authgui.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-12-27 19:39:21 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-12-27 19:39:21 +0000
commit0360823f5d4aed4d2c1f2cb97e0c3b414f1f0720 (patch)
tree140d3c98c2ff38a554834aa916be1d7d799dfc33 /etc/inc/authgui.inc
parent8c7f51fbe7e0f55e463dd28bf27133a8a7d2da07 (diff)
downloadpfsense-0360823f5d4aed4d2c1f2cb97e0c3b414f1f0720.zip
pfsense-0360823f5d4aed4d2c1f2cb97e0c3b414f1f0720.tar.gz
Adding LDAP backend glue.
Work sponsored-by: Centipede Networks <http://centipedenetworks.com/>
Diffstat (limited to 'etc/inc/authgui.inc')
-rw-r--r--etc/inc/authgui.inc21
1 files changed, 14 insertions, 7 deletions
diff --git a/etc/inc/authgui.inc b/etc/inc/authgui.inc
index 99013af..92214f7 100644
--- a/etc/inc/authgui.inc
+++ b/etc/inc/authgui.inc
@@ -1,6 +1,9 @@
<?php
/* $Id$ */
/*
+ Copyright (C) 2007, 2008 Scott Ullrich <sullrich@gmail.com>
+ All rights reserved.
+
Copyright (C) 2005-2006 Bill Marquette <bill.marquette@gmail.com>
All rights reserved.
@@ -34,20 +37,24 @@
include_once("auth.inc");
require_once("functions.inc");
-/* TODO: Needs testing... require_once("pages.inc"); */
-/* We only support htpasswd backed HTTP Basic auth right now
- * backing methods
+/* We only support htpasswd backed HTTP Basic auth and session
+ * based backing methods at the moment.
+ * session_auth - this will use session based authentication and timeout
+ * htpasswd_backed - this uses the "standard" .htpasswd file
* passwd_backed - this will use the system passwd file in /etc
* radius_backed - this will allow you to use a radius server
- * htpasswd_backed - this uses the "standard" .htpasswd file
* pam_backed - this uses the system's PAM facility .htpasswd file
*/
-//$auth_method="basic_auth";
$auth_method="session_auth";
-$backing_method="htpasswd_backed";
-/* Authenticate user - exit if failed (we should have a callback for this maybe) */
+/* enable correct auth backend, default to htpasswd_backed */
+if($config['system']['webgui']['backend'] == "ldap")
+ $backing_method="ldap_backed";
+else
+ $backing_method="htpasswd_backed";
+
+/* Authenticate user - exit if failed */
if (!$auth_method($backing_method)) { exit; }
/* scriptname is set in headjs.php if the user did try to access a page other
OpenPOWER on IntegriCloud