class AnonymousCsrfAccessCheck in Anonymous CSRF Token 2.x
Class AnonymousCsrfAccessCheck.
@package Drupal\anonymous_token\Access
Hierarchy
- class \Drupal\Core\Access\CsrfAccessCheck implements AccessInterface
- class \Drupal\anonymous_token\Access\AnonymousCsrfAccessCheck
Expanded class hierarchy of AnonymousCsrfAccessCheck
1 string reference to 'AnonymousCsrfAccessCheck'
1 service uses AnonymousCsrfAccessCheck
File
- src/
Access/ AnonymousCsrfAccessCheck.php, line 12
Namespace
Drupal\anonymous_token\AccessView source
class AnonymousCsrfAccessCheck extends CsrfAccessCheck {
/**
* The CSRF token generator.
*
* @var \Drupal\anonymous_token\Access\AnonymousCsrfTokenGenerator
*/
protected $csrfToken;
/**
* Constructs a AnonymousCsrfAccessCheck object.
*
* @param \Drupal\anonymous_token\Access\AnonymousCsrfTokenGenerator $csrf_token
* The CSRF token generator.
*/
public function __construct(AnonymousCsrfTokenGenerator $csrf_token) {
// We can't pass it to the parent as it's annotated with a class and not an
// interface so override it here.
$this->csrfToken = $csrf_token;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AnonymousCsrfAccessCheck:: |
protected | property |
The CSRF token generator. Overrides CsrfAccessCheck:: |
|
AnonymousCsrfAccessCheck:: |
public | function |
Constructs a AnonymousCsrfAccessCheck object. Overrides CsrfAccessCheck:: |
|
CsrfAccessCheck:: |
public | function | Checks access based on a CSRF token for the request. |