Generates and validates CSRF tokens.
Hierarchy
- class \Drupal\Core\Access\CsrfTokenGenerator
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. |
Please login to continue.