From 9129a163377126d30b78ff39c94385f4245df7ae Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 24 Oct 2015 09:30:27 -0400 Subject: Check for each request that reverse proxy user match user session --- app/Auth/ReverseProxy.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'app/Auth') diff --git a/app/Auth/ReverseProxy.php b/app/Auth/ReverseProxy.php index abcdd449..1910ad35 100644 --- a/app/Auth/ReverseProxy.php +++ b/app/Auth/ReverseProxy.php @@ -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 * -- cgit v1.2.3