public function CSRFCallbackAccessCheck::access in Brightcove Video Connect 8.2
Same name and namespace in other branches
- 8 src/Access/CSRFCallbackAccessCheck.php \Drupal\brightcove\Access\CSRFCallbackAccessCheck::access()
- 3.x src/Access/CSRFCallbackAccessCheck.php \Drupal\brightcove\Access\CSRFCallbackAccessCheck::access()
Custom access callback.
Parameters
\Drupal\Core\Routing\RouteMatchInterface $route_match: RouterMatch object.
Return value
\Drupal\Core\Access\AccessResult Access allowed only if the token is exists and did not expired.
File
- src/
Access/ CSRFCallbackAccessCheck.php, line 23
Class
- CSRFCallbackAccessCheck
- Custom CSRF access check callback.
Namespace
Drupal\brightcove\AccessCode
public function access(RouteMatchInterface $route_match) {
$token = $route_match
->getParameter('token');
return AccessResult::allowedIf(\Drupal::keyValueExpirable('brightcove_callback')
->has($token));
}