public function ChildController::tasteStroopwafelCookie in Bakery Single Sign-On System 8.2
Validate update request.
File
- src/
Controller/ ChildController.php, line 57
Class
Namespace
Drupal\bakery\ControllerCode
public function tasteStroopwafelCookie(Request $request) {
$type = 'stroopwafel';
$post = $request->request;
if (!$post
->has($type)) {
return AccessResult::forbidden();
}
$cookie = $this->kitchen
->tasteData($post
->get($type), $type);
if ($cookie === FALSE) {
return AccessResult::forbidden();
}
$request->attributes
->set('bakery', $cookie);
return AccessResult::allowed();
}