Check for each request that reverse proxy user match user session

This commit is contained in:
Frederic Guillot
2015-10-24 09:30:27 -04:00
parent 9aca556fc6
commit 9129a16337
4 changed files with 18 additions and 3 deletions

View File

@@ -20,6 +20,17 @@ class ReverseProxy extends Base
*/
const AUTH_NAME = 'ReverseProxy';
/**
* Get username from the reverse proxy
*
* @access public
* @return string
*/
public function getUsername()
{
return isset($_SERVER[REVERSE_PROXY_USER_HEADER]) ? $_SERVER[REVERSE_PROXY_USER_HEADER] : '';
}
/**
* Authenticate the user with the HTTP header
*