Class OAuthRequest

Description

Located in /OAuth.php (line 191)


	
			
Variable Summary
 mixed $base_string
 mixed $http_method
 mixed $http_url
 mixed $parameters
 mixed $version
Method Summary
 static void from_consumer_and_token ( $consumer,  $token,  $http_method,  $http_url, [ $parameters = NULL])
 static void from_request ([ $http_method = NULL], [ $http_url = NULL], [ $parameters = NULL])
 static void generate_nonce ()
 static void generate_timestamp ()
 static void get_headers ()
 static void split_header ( $header)
 OAuthRequest OAuthRequest ( $http_method,  $http_url, [ $parameters = NULL])
 void build_signature ( $signature_method,  $consumer,  $token)
 void get_parameter ( $name)
 void get_parameters ()
 void set_parameter ( $name,  $value)
 void sign_request ( $signature_method,  $consumer,  $token)
 void to_header ()
 void to_postdata ()
 void to_url ()
 void unset_parameter ( $name)
 void __toString ()
Variables
mixed $base_string (line 196)
mixed $http_method (line 193)
mixed $http_url (line 194)
mixed $parameters (line 192)
mixed $version = '1.0' (line 197)
Methods
static from_consumer_and_token (line 250)

pretty much a helper function to set up the request

pretty much a helper function to set up the request

void from_consumer_and_token ( $consumer,  $token,  $http_method,  $http_url, [ $parameters = NULL])
  • $consumer
  • $token
  • $http_method
  • $http_url
  • $parameters
static from_request (line 214)

attempt to build up a request from what was passed to the server

attempt to build up a request from what was passed to the server

void from_request ([ $http_method = NULL], [ $http_url = NULL], [ $parameters = NULL])
  • $http_method
  • $http_url
  • $parameters
static generate_nonce (line 425)

util function: current nonce

util function: current nonce

void generate_nonce ()
static generate_timestamp (line 418)

util function: current timestamp

util function: current timestamp

void generate_timestamp ()
static get_headers (line 458)

helper to try to sort out headers for people who aren't running apache

helper to try to sort out headers for people who aren't running apache

void get_headers ()
static split_header (line 436)

util function for turning the Authorization: header into

util function for turning the Authorization: header into parameters, has to do some unescaping

void split_header ( $header)
  • $header
Constructor OAuthRequest (line 199)
OAuthRequest OAuthRequest ( $http_method,  $http_url, [ $parameters = NULL])
  • $http_method
  • $http_url
  • $parameters
build_signature (line 410)
void build_signature ( $signature_method,  $consumer,  $token)
  • $signature_method
  • $consumer
  • $token
get_normalized_http_method (line 336)

just uppercases the http method

just uppercases the http method

void get_normalized_http_method ()
get_normalized_http_url (line 344)

parses the url and rebuilds it to be

parses the url and rebuilds it to be scheme://host/path

void get_normalized_http_url ()
get_parameter (line 268)
void get_parameter ( $name)
  • $name
get_parameters (line 272)
void get_parameters ()
get_signable_parameters (line 288)

Returns the normalized parameters of the request This will be all (except oauth_signature) parameters, sorted first by key, and if duplicate keys, then by value.

Returns the normalized parameters of the request This will be all (except oauth_signature) parameters, sorted first by key, and if duplicate keys, then by value. The returned string will be all the key=value pairs concated by &.

string get_signable_parameters ()
get_signature_base_string (line 321)

Returns the base string of this request The base string defined as the method, the url and the parameters (normalized), each urlencoded and the concated with &.

Returns the base string of this request The base string defined as the method, the url and the parameters (normalized), each urlencoded and the concated with &.

void get_signature_base_string ()
set_parameter (line 264)
void set_parameter ( $name,  $value)
  • $name
  • $value
sign_request (line 404)
void sign_request ( $signature_method,  $consumer,  $token)
  • $signature_method
  • $consumer
  • $token
to_header (line 380)

builds the Authorization: header

builds the Authorization: header

void to_header ()
to_postdata (line 373)

builds the data one would send in a POST request

builds the data one would send in a POST request

void to_postdata ()
to_url (line 364)

builds a url usable for a GET request

builds a url usable for a GET request

void to_url ()
unset_parameter (line 206)
void unset_parameter ( $name)
  • $name
__toString (line 399)
void __toString ()

Documentation generated on Thu, 22 Oct 2009 12:54:45 -0700 by phpDocumentor 1.4.3