matomo / tests /PHPUnit /Integration /Http /HttpAuthentication.php
Leon4gr45's picture
Upload folder using huggingface_hub (part 55)
bf8c0ce verified
Raw History Blame Contribute Delete
325 Bytes
<?php
if (isset($_SERVER['PHP_AUTH_USER']) && $_SERVER['PHP_AUTH_USER'] == 'test' && $_SERVER['PHP_AUTH_PW'] == 'test') {
echo 'Authentication successful';
exit;
} else {
header('WWW-Authenticate: Basic realm="TestAuth"');
header('HTTP/1.0 401 Unauthorized');
echo 'Authentication required';
exit;
}