public function CsrfRequestHeaderAccessCheck::__construct in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Access/CsrfRequestHeaderAccessCheck.php \Drupal\Core\Access\CsrfRequestHeaderAccessCheck::__construct()
- 9 core/lib/Drupal/Core/Access/CsrfRequestHeaderAccessCheck.php \Drupal\Core\Access\CsrfRequestHeaderAccessCheck::__construct()
Constructs a new rest CSRF access check.
Parameters
\Drupal\Core\Session\SessionConfigurationInterface $session_configuration: The session configuration.
\Drupal\Core\Access\CsrfTokenGenerator $csrf_token: The token generator.
File
- core/
lib/ Drupal/ Core/ Access/ CsrfRequestHeaderAccessCheck.php, line 42
Class
- CsrfRequestHeaderAccessCheck
- Access protection against CSRF attacks.
Namespace
Drupal\Core\AccessCode
public function __construct(SessionConfigurationInterface $session_configuration, CsrfTokenGenerator $csrf_token) {
$this->sessionConfiguration = $session_configuration;
$this->csrfToken = $csrf_token;
}