Search for token

  1. Search 7.x for token
  2. Search 8.9.x for token
  3. Search 10.3.x for token
  4. Search 11.x for token
  5. Other projects

Exact matches

These are exact matches according to your search
Title Object type File name Summary
token service core/core.services.yml Drupal\Core\Utility\Token
Token class core/lib/Drupal/Core/Render/Element/Token.php Stores token data in a hidden form field.
Token class core/lib/Drupal/Core/Utility/Token.php Drupal placeholder/token replacement system.

All search results

Title Object type File name Summary
CsrfTokenGenerator class core/lib/Drupal/Core/Access/CsrfTokenGenerator.php Generates and validates CSRF tokens.
CsrfTokenGenerator.php file core/lib/Drupal/Core/Access/CsrfTokenGenerator.php
CsrfTokenGenerator::$privateKey property core/lib/Drupal/Core/Access/CsrfTokenGenerator.php The private key service.
CsrfTokenGenerator::$sessionMetadata property core/lib/Drupal/Core/Access/CsrfTokenGenerator.php The session metadata bag.
CsrfTokenGenerator::computeToken function core/lib/Drupal/Core/Access/CsrfTokenGenerator.php Generates a token based on $value, the token seed, and the private key.
CsrfTokenGenerator::get function core/lib/Drupal/Core/Access/CsrfTokenGenerator.php Generates a token based on $value, the user session, and the private key.
CsrfTokenGenerator::validate function core/lib/Drupal/Core/Access/CsrfTokenGenerator.php Validates a token based on $value, the user session, and the private key.
CsrfTokenGenerator::__construct function core/lib/Drupal/Core/Access/CsrfTokenGenerator.php Constructs the token generator.
CsrfTokenGeneratorTest class core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php Tests the CsrfTokenGenerator class.
CsrfTokenGeneratorTest.php file core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php
CsrfTokenGeneratorTest::$generator property core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php The CSRF token generator.
CsrfTokenGeneratorTest::$privateKey property core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php The mock private key instance.
CsrfTokenGeneratorTest::$sessionMetadata property core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php The mock session metadata bag.
CsrfTokenGeneratorTest::providerTestInvalidParameterTypes function core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php Provides data for testInvalidParameterTypes.
CsrfTokenGeneratorTest::providerTestValidateParameterTypes function core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php Provides data for testValidateParameterTypes.
CsrfTokenGeneratorTest::setUp function core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php
CsrfTokenGeneratorTest::setupDefaultExpectations function core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php Set up default expectations on the mocks.
CsrfTokenGeneratorTest::testGenerateSeedOnGet function core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php Tests that a new token seed is generated upon first use.
CsrfTokenGeneratorTest::testGet function core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php Tests CsrfTokenGenerator::get().
CsrfTokenGeneratorTest::testGetWithNoHashSalt function core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php Tests the exception thrown when no 'hash_salt' is provided in settings.
CsrfTokenGeneratorTest::testInvalidParameterTypes function core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php Tests CsrfTokenGenerator::validate() with invalid parameter types.
CsrfTokenGeneratorTest::testValidate function core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php Tests CsrfTokenGenerator::validate().
CsrfTokenGeneratorTest::testValidateParameterTypes function core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php Tests CsrfTokenGenerator::validate() with different parameter types.
CsrfTokenRaceTest class core/tests/Drupal/FunctionalJavascriptTests/Core/CsrfTokenRaceTest.php Test race condition for CSRF tokens for simultaneous requests.
CsrfTokenRaceTest.php file core/tests/Drupal/FunctionalJavascriptTests/Core/CsrfTokenRaceTest.php
CsrfTokenRaceTest::$defaultTheme property core/tests/Drupal/FunctionalJavascriptTests/Core/CsrfTokenRaceTest.php The theme to install as the default for testing.
CsrfTokenRaceTest::$modules property core/tests/Drupal/FunctionalJavascriptTests/Core/CsrfTokenRaceTest.php Modules to enable.
CsrfTokenRaceTest::testCsrfRace function core/tests/Drupal/FunctionalJavascriptTests/Core/CsrfTokenRaceTest.php Tests race condition for CSRF tokens for simultaneous requests.
csrf_token service core/core.services.yml Drupal\Core\Access\CsrfTokenGenerator
DeprecatedCsrfTokenController class core/modules/system/tests/modules/csrf_test/src/Controller/DeprecatedCsrfTokenController.php Returns responses for Deprecated CSRF token routes.
DeprecatedCsrfTokenController.php file core/modules/system/tests/modules/csrf_test/src/Controller/DeprecatedCsrfTokenController.php
DeprecatedCsrfTokenController::$tokenGenerator property core/modules/system/tests/modules/csrf_test/src/Controller/DeprecatedCsrfTokenController.php The CSRF token generator.
DeprecatedCsrfTokenController::create function core/modules/system/tests/modules/csrf_test/src/Controller/DeprecatedCsrfTokenController.php Instantiates a new instance of this class.
DeprecatedCsrfTokenController::csrfToken function core/modules/system/tests/modules/csrf_test/src/Controller/DeprecatedCsrfTokenController.php Returns a CSRF using the deprecated 'rest' value protecting session token.
DeprecatedCsrfTokenController::__construct function core/modules/system/tests/modules/csrf_test/src/Controller/DeprecatedCsrfTokenController.php Constructs a new CsrfTokenController object.
DisplayPluginBase::getArgumentsTokens function core/modules/views/src/Plugin/views/display/DisplayPluginBase.php Returns to tokens for arguments.
DisplayPluginInterface::getArgumentsTokens function core/modules/views/src/Plugin/views/display/DisplayPluginInterface.php Returns to tokens for arguments.
DocParser::findInitialTokenPosition function core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php Finds the first valid annotation
Drupal::csrfToken function core/lib/Drupal.php Returns the CSRF token manager service.
Drupal::token function core/lib/Drupal.php Returns the token service.
DrupalTest::testCsrfToken function core/tests/Drupal/Tests/Core/DrupalTest.php Tests the csrfToken() method.
DrupalTest::testToken function core/tests/Drupal/Tests/Core/DrupalTest.php Tests the token() method.
DynamicPluginConfigWithCsrfTokenUrlTrait trait core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/DynamicPluginConfigWithCsrfTokenUrlTrait.php Provides a trait for CKEditor 5 with dynamically generated CSRF token URLs.
DynamicPluginConfigWithCsrfTokenUrlTrait.php file core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/DynamicPluginConfigWithCsrfTokenUrlTrait.php
DynamicPluginConfigWithCsrfTokenUrlTrait::getUrlWithReplacedCsrfTokenPlaceholder function core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/DynamicPluginConfigWithCsrfTokenUrlTrait.php Gets the given URL with all placeholders replaced.
EmailAction::$token property core/lib/Drupal/Core/Action/Plugin/Action/EmailAction.php The token service.
EntityField::addSelfTokens function core/modules/views/src/Plugin/views/field/EntityField.php Add any special tokens this field might use for itself.
EntityField::documentSelfTokens function core/modules/views/src/Plugin/views/field/EntityField.php Document any special tokens this field might use for itself.
EntityTest::providerTestTokens function core/modules/views/tests/src/Unit/Plugin/area/EntityTest.php Data provider for testing different types of tokens.
EntityTest::testRenderWithIdAndToken function core/modules/views/tests/src/Unit/Plugin/area/EntityTest.php @covers ::render
@covers ::defineOptions
@covers ::init

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.