Commit 84fa0d26 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(login) Move HTTP Auth specific method to LoginHTTPAuth

issue #5778
Showing with 9 additions and 9 deletions
+9 -9
...@@ -53,6 +53,15 @@ class LoginHTTPAuth extends LoginMethod ...@@ -53,6 +53,15 @@ class LoginHTTPAuth extends LoginMethod
} }
} }
/*! \brief Return HTTP authentication header */
static function authenticateHeader($message = 'Authentication required')
{
header('WWW-Authenticate: Basic realm="FusionDirectory"');
header('HTTP/1.0 401 Unauthorized');
echo "$message\n";
exit;
}
static function active() static function active()
{ {
global $config; global $config;
......
...@@ -157,15 +157,6 @@ class LoginMethod ...@@ -157,15 +157,6 @@ class LoginMethod
exit; exit;
} }
/*! \brief Return HTTP authentication header */
static function authenticateHeader($message = 'Authentication required')
{
header('WWW-Authenticate: Basic realm="FusionDirectory"');
header('HTTP/1.0 401 Unauthorized');
echo "$message\n";
exit;
}
/*! \brief Run each step in $steps, stop on errors */ /*! \brief Run each step in $steps, stop on errors */
static function runSteps($steps) static function runSteps($steps)
{ {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment