public function validate(Vanilla\Request $request, Vanilla\User $user = null, Vanilla\Config $config = null)
 {
     $signature = md5($request->getTimestamp() . $config->getSecret());
     if ($request->getSignature() != $signature) {
         return new Response\InvalidSignature($request);
     }
 }
 public function validate(Vanilla\Request $request, Vanilla\User $user = null, Vanilla\Config $config = null)
 {
     $requestTimestamp = $request->getTimestamp();
     $requestSignature = $request->getSignature();
     if (empty($requestTimestamp) && empty($requestSignature)) {
         return new Response\UnsignedRequest($request, $user);
     }
 }
 public function validate(Vanilla\Request $request, Vanilla\User $user = null, Vanilla\Config $config = null)
 {
     if ($request->getClientID() !== $config->getClientID()) {
         $clientID = $request->getClientID();
         $clientResponse = new Response\InvalidClientID($request);
         $clientResponse->setClientID($clientID);
         return $clientResponse;
     }
 }
 public function validate(Vanilla\Request $request, Vanilla\User $user = null, Vanilla\Config $config = null)
 {
     if (time() - $request->getTimestamp() > $config->getJsTimeout()) {
         return new Response\ExpiredTimestamp($request);
     }
 }
 public function validate(Vanilla\Request $request, Vanilla\User $user = null, Vanilla\Config $config = null)
 {
     if (empty($request->getClientID())) {
         return new Response\MissingClientID($request);
     }
 }
 public function validate(Vanilla\Request $request, Vanilla\User $user = null, Vanilla\Config $config = null)
 {
     if (!is_numeric($request->getTimestamp())) {
         return new Response\InvalidTimestamp($request);
     }
 }