diff --git a/inc/auth.php b/inc/auth.php index 7c739d4efaa1fb618aeb13c168ab6d40d004e8e7..264a1a5fad739aa0237deb177d398856b1887b99 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']);