class CsrfTokenGenerator

Generates and validates CSRF tokens.

Hierarchy

See also

\Drupal\Tests\Core\Access\CsrfTokenGeneratorTest

File

core/lib/Drupal/Core/Access/CsrfTokenGenerator.php, line 15

Namespace

Drupal\Core\Access

Members

Name Modifiers Type Description
CsrfTokenGenerator::$privateKey protected property The private key service.
CsrfTokenGenerator::$sessionMetadata protected property The session metadata bag.
CsrfTokenGenerator::computeToken protected function Generates a token based on $value, the token seed, and the private key.
CsrfTokenGenerator::get public function Generates a token based on $value, the user session, and the private key.
CsrfTokenGenerator::validate public function Validates a token based on $value, the user session, and the private key.
CsrfTokenGenerator::__construct public function Constructs the token generator.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Access!CsrfTokenGenerator.php/class/CsrfTokenGenerator/8.1.x