public function CsrfTokenGenerator::__construct in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Access/CsrfTokenGenerator.php \Drupal\Core\Access\CsrfTokenGenerator::__construct()
Constructs the token generator.
Parameters
\Drupal\Core\PrivateKey $private_key: The private key service.
\Drupal\Core\Session\MetadataBag $session_metadata: The session metadata bag.
File
- core/
lib/ Drupal/ Core/ Access/ CsrfTokenGenerator.php, line 44 - Contains \Drupal\Core\Access\CsrfTokenGenerator.
Class
- CsrfTokenGenerator
- Generates and validates CSRF tokens.
Namespace
Drupal\Core\AccessCode
public function __construct(PrivateKey $private_key, MetadataBag $session_metadata) {
$this->privateKey = $private_key;
$this->sessionMetadata = $session_metadata;
}