Skip to content

Commit

Permalink
read authentication from $REMOTE_USER (#202)
Browse files Browse the repository at this point in the history
This change allows other authentication methods than HTTP Basic Auth
with Apache. httpd puts user information (e.g when using SSLVerifyClient
and SSLUserName) into $REMOTE_USER, which is not picked up by PHP's
basic auth variables.
  • Loading branch information
uedvt359 authored Dec 22, 2023
1 parent 9a3bb9c commit 58f8110
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions requesthandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

if(isset($_SERVER['PHP_AUTH_USER'])) {
$active_user = $user_dir->get_user_by_uid($_SERVER['PHP_AUTH_USER']);
} elseif(isset($_SERVER['REMOTE_USER'])) {
$active_user = $user_dir->get_user_by_uid($_SERVER['REMOTE_USER']);
} else {
throw new Exception("Not logged in.");
}
Expand Down

0 comments on commit 58f8110

Please sign in to comment.