DisallowBasicAuthRequests.php in Drupal 10
File
core/modules/basic_auth/src/PageCache/DisallowBasicAuthRequests.php
View source
<?php
namespace Drupal\basic_auth\PageCache;
use Drupal\Core\PageCache\RequestPolicyInterface;
use Symfony\Component\HttpFoundation\Request;
class DisallowBasicAuthRequests implements RequestPolicyInterface {
public function check(Request $request) {
$username = $request->headers
->get('PHP_AUTH_USER');
$password = $request->headers
->get('PHP_AUTH_PW');
if (isset($username) && isset($password)) {
return self::DENY;
}
}
}