CsrfTokenGenerator::__construct

public CsrfTokenGenerator::__construct(PrivateKey $private_key, MetadataBag $session_metadata)

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 39

Class

CsrfTokenGenerator
Generates and validates CSRF tokens.

Namespace

Drupal\Core\Access

Code

public function __construct(PrivateKey $private_key, MetadataBag $session_metadata) {
  $this->privateKey = $private_key;
  $this->sessionMetadata = $session_metadata;
}
doc_Drupal
2016-10-29 08:59:13
Comments
Leave a Comment

Please login to continue.