public function DisallowBasicAuthRequests::check in Drupal 10
Same name and namespace in other branches
- 8 core/modules/basic_auth/src/PageCache/DisallowBasicAuthRequests.php \Drupal\basic_auth\PageCache\DisallowBasicAuthRequests::check()
- 9 core/modules/basic_auth/src/PageCache/DisallowBasicAuthRequests.php \Drupal\basic_auth\PageCache\DisallowBasicAuthRequests::check()
File
- core/
modules/ basic_auth/ src/ PageCache/ DisallowBasicAuthRequests.php, line 20
Class
- DisallowBasicAuthRequests
- Cache policy for pages served from basic auth.
Namespace
Drupal\basic_auth\PageCacheCode
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;
}
}