diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-10-24 09:30:27 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-10-24 09:30:27 -0400 |
commit | 9129a163377126d30b78ff39c94385f4245df7ae (patch) | |
tree | dfd62157b7bb6d6c0d25a1d883bc834165d32c9f /app/Auth | |
parent | 9aca556fc6db6c23c4c95a0e30425fe966003f0e (diff) |
Check for each request that reverse proxy user match user session
Diffstat (limited to 'app/Auth')
-rw-r--r-- | app/Auth/ReverseProxy.php | 11 |
1 files changed, 11 insertions, 0 deletions
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 @@ -21,6 +21,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 * * @access public |