raspap-webgui-mirror/includes/authenticate.php

17 lines
350 B
PHP
Raw Normal View History

2016-05-29 15:38:43 +00:00
<?php
if (RASPI_AUTH_ENABLED) {
$user = $_SERVER['PHP_AUTH_USER'] ?? '';
$pass = $_SERVER['PHP_AUTH_PW'] ?? '';
$auth = new \RaspAP\Auth\HTTPAuth;
if (!$auth->isLogged()) {
if ($auth->login($user, $pass)) {
$config = $auth->getAuthConfig();
} else {
$auth->authenticate();
}
}
2016-05-29 15:38:43 +00:00
}