/**
  * Check that version is 1.0.
  *
  * @param JacobKiers\OAuth\Request\RequestInterface $request
  *
  * @return string
  *
  * @throws JacobKiers\OAuth\OAuthException
  */
 private function getVersion(RequestInterface $request)
 {
     $version = $request->getOAuthVersion();
     if (!$version) {
         // Service Providers MUST assume the protocol version to be 1.0 if this parameter is not present.
         // Chapter 7.0 ("Accessing Protected Ressources")
         $version = '1.0';
     }
     if ($version !== $this->version) {
         throw new OAuthException("OAuth version '{$version}' not supported");
     }
     return $version;
 }