Download tests/PHPUnit/Integration/Http/HttpAuthentication.php from Leon4gr45/matomo: direct link, hf CLI and curl.
- Browser
- Download file 325 Bytes
-
https://huggingface.co/spaces/Leon4gr45/matomo/resolve/main/tests/PHPUnit/Integration/Http/HttpAuthentication.php
- Command line
-
hf download hf://spaces/Leon4gr45/matomo/tests/PHPUnit/Integration/Http/HttpAuthentication.php
-
curl -L -o HttpAuthentication.php https://huggingface.co/spaces/Leon4gr45/matomo/resolve/main/tests/PHPUnit/Integration/Http/HttpAuthentication.php
325 Bytes
| 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; | |
| } | |