You are here

public function CsrfRequestHeaderAccessCheck::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 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\Access

Code

public function __construct(SessionConfigurationInterface $session_configuration, CsrfTokenGenerator $csrf_token) {
  $this->sessionConfiguration = $session_configuration;
  $this->csrfToken = $csrf_token;
}