summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/auth.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/inc/auth.php b/inc/auth.php
index 7c739d4ef..264a1a5fa 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -53,6 +53,12 @@
// do the login either by cookie or provided credentials
if($conf['useacl']){
+ // if no credentials were given try to use HTTP auth (for SSO)
+ if(!$_REQUEST['u'] && !$_COOKIE[DOKU_COOKIE] && $_SERVER['PHP_AUTH_USER']){
+ $_REQUEST['u'] = $_SERVER['PHP_AUTH_USER'];
+ $_REQUEST['p'] = $_SERVER['PHP_AUTH_PW'];
+ }
+
// external trust mechanism in place?
if(!is_null($auth) && $auth->canDo('external')){
$auth->trustExternal($_REQUEST['u'],$_REQUEST['p'],$_REQUEST['r']);