Lines Matching +full:hi +full:- +full:level

15     $this->key = $key;
16 $this->secret = $secret;
17 $this->callback_url = $callback_url;
21 return "OAuthConsumer[key=$this->key,secret=$this->secret]";
35 $this->key = $key;
36 $this->secret = $secret;
45 OAuthUtil::urlencode_rfc3986($this->key) .
47 OAuthUtil::urlencode_rfc3986($this->secret);
51 return $this->to_string();
61 * Needs to return the name of the Signature Method (ie HMAC-SHA1)
87 $built = $this->build_signature($request, $consumer, $token);
93 * The HMAC-SHA1 signature method uses the HMAC-SHA1 signature algorithm as defined in [RFC2104]
97 * - Chapter 9.2 ("HMAC-SHA1")
101 return "HMAC-SHA1";
105 $base_string = $request->get_signature_base_string();
106 $request->base_string = $base_string;
109 $consumer->secret,
110 ($token) ? $token->secret : ""
123 * - Chapter 9.4 ("PLAINTEXT")
134 * - Chapter 9.4.1 ("Generating Signatures")
141 $consumer->secret,
142 ($token) ? $token->secret : ""
147 $request->base_string = $key;
154 * The RSA-SHA1 signature method uses the RSASSA-PKCS1-v1_5 signature algorithm as defined in
155 * [RFC3447] section 8.2 (more simply known as PKCS#1), using SHA-1 as the hash function for
156 * EMSA-PKCS1-v1_5. It is assumed that the Consumer has provided its RSA public key in a
159 * - Chapter 9.3 ("RSA-SHA1")
163 return "RSA-SHA1";
181 $base_string = $request->get_signature_base_string();
182 $request->base_string = $base_string;
185 $cert = $this->fetch_private_cert($request);
202 $base_string = $request->get_signature_base_string();
205 $cert = $this->fetch_public_cert($request);
232 $this->parameters = $parameters;
233 $this->http_method = $http_method;
234 $this->http_url = $http_url;
254 // If you run XML-RPC or similar you should use this to provide your own
255 // parsed parameter-list
260 // Parse the query-string to find GET parameters
263 // It's a POST request of the proper content-type, so parse POST
266 && @strstr($request_headers["Content-Type"],
267 "application/x-www-form-urlencoded")
275 // We have a Authorization-header with OAuth data. Parse the header
297 "oauth_consumer_key" => $consumer->key);
299 $defaults['oauth_token'] = $token->key;
307 if ($allow_duplicates && isset($this->parameters[$name])) {
309 if (is_scalar($this->parameters[$name])) {
312 $this->parameters[$name] = array($this->parameters[$name]);
315 $this->parameters[$name][] = $value;
317 $this->parameters[$name] = $value;
322 return isset($this->parameters[$name]) ? $this->parameters[$name] : null;
326 return $this->parameters;
330 unset($this->parameters[$name]);
339 $params = $this->parameters;
359 $this->get_normalized_http_method(),
360 $this->get_normalized_http_url(),
361 $this->get_signable_parameters()
373 return strtoupper($this->http_method);
381 $parts = parse_url($this->http_url);
401 $post_data = $this->to_postdata();
402 $out = $this->get_normalized_http_url();
413 return OAuthUtil::build_http_query($this->parameters);
428 foreach ($this->parameters as $k => $v) {
444 return $this->to_url();
449 $this->set_parameter(
451 $signature_method->get_name(),
454 $signature = $this->build_signature($signature_method, $consumer, $token);
455 $this->set_parameter("oauth_signature", $signature, false);
459 $signature = $signature_method->build_signature($this, $consumer, $token);
483 protected $version = '1.0'; // hi blaine
489 $this->data_store = $data_store;
493 $this->signature_methods[$signature_method->get_name()] =
497 // high level functions
504 $this->get_version($request);
506 $consumer = $this->get_consumer($request);
511 $this->check_signature($request, $consumer, $token);
514 $callback = $request->get_parameter('oauth_callback');
515 $new_token = $this->data_store->new_request_token($consumer, $callback);
525 $this->get_version($request);
527 $consumer = $this->get_consumer($request);
530 $token = $this->get_token($request, $consumer, "request");
532 $this->check_signature($request, $consumer, $token);
535 $verifier = $request->get_parameter('oauth_verifier');
536 $new_token = $this->data_store->new_access_token($token, $consumer, $verifier);
545 $this->get_version($request);
546 $consumer = $this->get_consumer($request);
547 $token = $this->get_token($request, $consumer, "access");
548 $this->check_signature($request, $consumer, $token);
557 $version = $request->get_parameter("oauth_version");
563 if ($version !== $this->version) {
574 @$request->get_parameter("oauth_signature_method");
577 // According to chapter 7 ("Accessing Protected Ressources") the signature-method
583 array_keys($this->signature_methods))) {
587 implode(", ", array_keys($this->signature_methods))
590 return $this->signature_methods[$signature_method];
597 $consumer_key = @$request->get_parameter("oauth_consumer_key");
602 $consumer = $this->data_store->lookup_consumer($consumer_key);
614 $token_field = @$request->get_parameter('oauth_token');
615 $token = $this->data_store->lookup_token(
625 * all-in-one function to check the signature on a request
630 $timestamp = @$request->get_parameter('oauth_timestamp');
631 $nonce = @$request->get_parameter('oauth_nonce');
633 $this->check_timestamp($timestamp);
634 $this->check_nonce($consumer, $token, $nonce, $timestamp);
636 $signature_method = $this->get_signature_method($request);
638 $signature = $request->get_parameter('oauth_signature');
639 $valid_sig = $signature_method->check_signature(
662 if (abs($now - $timestamp) > $this->timestamp_threshold) {
679 $found = $this->data_store->lookup_nonce(
743 // Can filter out any non-oauth parameters if needed (default behaviour)
745 $pattern = '/(([-_a-z]*)=("([^"]*)"|([^,]*)),?)/';
773 // we always want the keys to be Cased-Like-This and arh()
780 "-",
781 ucwords(strtolower(str_replace("-", " ", $key)))
790 $out['Content-Type'] = $_SERVER['CONTENT_TYPE'];
792 $out['Content-Type'] = $_ENV['CONTENT_TYPE'];
801 "-",
869 // Each name-value pair is separated by an '&' character (ASCII code 38)