/**
  * @param ConsumerInterface $consumer
  * @return string
  */
 private function timestampsKey(ConsumerInterface $consumer)
 {
     return "timestamps/key:{$consumer->getConsumerKey()}";
 }
 /**
  * Calculate the signature and compare it to the given signature.
  *
  * @param  ConsumerInterface $consumer          A consumer.
  * @param  array             $requestParameters An array of request parameters.
  * @param  string            $requestMethod     The request method.
  * @param  string            $requestUrl        The request UI
  * @param  TokenInterface    $token             A token.
  * @return boolean           <code>true</code> if the provided signature is correct,
  *                   <code>false</code> otherwise.
  */
 protected function approveSignature(ConsumerInterface $consumer, $requestParameters, $requestMethod, $requestUrl, TokenInterface $token = null)
 {
     $signatureService = $this->getSignatureService($requestParameters['oauth_signature_method']);
     $baseString = $this->getSignatureBaseString($signatureService, $requestMethod, $requestUrl, $this->normalizeRequestParameters($requestParameters));
     $secretToken = null !== $token ? $token->getSecret() : '';
     $calculatedSignature = $signatureService->sign($baseString, $consumer->getConsumerSecret(), $secretToken);
     return $calculatedSignature === $requestParameters['oauth_signature'];
 }