public function checkRequirements($element)
{
try {
parent::checkRequirements($element);
} catch (Application\ForbiddenRequestException $e) {
$this->sendErrorResource($e);
}
// Try to authenticate client
try {
$this->authentication->authenticate($this->getInput());
} catch (SecurityException $e) {
$this->sendErrorResource($e);
}
}