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

🚑 fix(login) Move HTTP Auth specific method to LoginHTTPAuth

issue #5778
parent 5bc05872
......@@ -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()
{
global $config;
......
......@@ -157,15 +157,6 @@ class LoginMethod
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 */
static function runSteps($steps)
{
......
Markdown is supported
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