public static function verifyKeyAndSecret($key, $secret, $http_url=NULL, $parameters=null, $http_method=NULL) {
        global $LastOAuthBodyBaseString;
        if ( ! ($key && $secret) ) return array("Missing key or secret", "");
        $store = new TrivialOAuthDataStore();
        $store->add_consumer($key, $secret);

        $server = new OAuthServer($store);

        $method = new OAuthSignatureMethod_HMAC_SHA1();
        $server->add_signature_method($method);
        $method = new OAuthSignatureMethod_HMAC_SHA256();
        $server->add_signature_method($method);

        $request = OAuthRequest::from_request($http_method, $http_url, $parameters);

        $LastOAuthBodyBaseString = $request->get_signature_base_string();

        try {
            $server->verify_request($request);
            return true;
        } catch (\Exception $e) {
            return array($e->getMessage(), $LastOAuthBodyBaseString);
        }
    }