Abstract Class JOAuth1Client

Description

Joomla Platform class for interacting with an OAuth 1.0 and 1.0a server.

  • abstract:
  • since: 13.1

Located in /libraries/joomla/oauth1/client.php (line 19)


	
			
Direct descendents
Class Description
 class JLinkedinOauth Joomla Platform class for generating Linkedin API access token.
 class JOpenstreetmapOauth Joomla Platform class for generating Openstreetmap API access token.
 class JTwitterOAuth Joomla Platform class for generating Twitter API access token.
Variable Summary
Method Summary
 static string generateNonce ()
 JOAuth1Client __construct ([JRegistry $options = null], [JHttp $client = null], [JInput $input = null], [JApplicationWeb $application = null], [string $version = null])
 array authenticate ()
 mixed getOption (string $key)
 array getToken ()
 JHttpResponse oauthRequest (string $url, string $method, array $parameters, [mixed $data = array()], [array $headers = array()])
 string safeEncode (mixed $data)
 JOAuth1Client setOption (string $key, mixed $value)
 JOAuth1Client setToken (array $token)
 string toUrl (string $url, array $parameters)
 void validateResponse (string $url, JHttpResponse $response)
Variables
JApplicationWeb $application (line 49)
  • var: The application object to send HTTP headers for redirects.
  • since: 13.1
  • access: protected
JHttp $client (line 37)
  • var: The HTTP client object to use in sending HTTP requests.
  • since: 13.1
  • access: protected
JInput $input (line 43)
  • var: The input object to use in retrieving GET/POST data.
  • since: 13.1
  • access: protected
JRegistry $options (line 25)
  • var: Options for the JOAuth1Client object.
  • since: 13.1
  • access: protected

Redefined in descendants as:
array $token = array() (line 31)
  • var: Contains access token key, secret and verifier.
  • since: 13.1
  • access: protected
string $version (line 55)
  • var: Selects which version of OAuth to use: 1.0 or 1.0a.
  • since: 13.1
  • access: protected
Methods
static generateNonce (line 517)

Method used to generate the current nonce.

  • return: The current nonce.
  • since: 13.1
  • access: public
static string generateNonce ()
Constructor __construct (line 68)

Constructor.

  • since: 13.1
  • access: public
JOAuth1Client __construct ([JRegistry $options = null], [JHttp $client = null], [JInput $input = null], [JApplicationWeb $application = null], [string $version = null])
  • JRegistry $options: OAuth1Client options object.
  • JHttp $client: The HTTP client object.
  • JInput $input: The input object
  • JApplicationWeb $application: The application object
  • string $version: Specify the OAuth version. By default we are using 1.0a.

Redefined in descendants as:
authenticate (line 86)

Method to for the oauth flow.

  • return: Contains access token key, secret and verifier.
  • since: 13.1
  • throws: DomainException
  • access: public
array authenticate ()
getOption (line 557)

Get an option from the JOauth1aClient instance.

  • return: The option value
  • since: 13.1
  • access: public
mixed getOption (string $key)
  • string $key: The name of the option to get
getToken (line 586)

Get the oauth token key or secret.

  • return: The oauth token key and secret.
  • since: 13.1
  • access: public
array getToken ()
oauthRequest (line 256)

Method used to make an OAuth request.

  • since: 13.1
  • throws: DomainException
  • access: public
JHttpResponse oauthRequest (string $url, string $method, array $parameters, [mixed $data = array()], [array $headers = array()])
  • string $url: The request URL.
  • string $method: The request method.
  • array $parameters: Array containing request parameters.
  • mixed $data: The POST request data.
  • array $headers: An array of name-value pairs to include in the header of the request
safeEncode (line 490)

Encodes the string or array passed in a way compatible with OAuth.

If an array is passed each array value will will be encoded.

  • return: encoded in a way compatible with OAuth.
  • since: 13.1
  • access: public
string safeEncode (mixed $data)
  • mixed $data: The scalar or array to encode.
setOption (line 572)

Set an option for the JOauth1aClient instance.

  • return: This object for method chaining
  • since: 13.1
  • access: public
JOAuth1Client setOption (string $key, mixed $value)
  • string $key: The name of the option to set
  • mixed $value: The option value to set
setToken (line 600)

Set the oauth token.

  • return: This object for method chaining.
  • since: 13.1
  • access: public
JOAuth1Client setToken (array $token)
  • array $token: The access token key and secret.
toUrl (line 367)

Method to create the URL formed string with the parameters.

  • return: The formed URL.
  • since: 13.1
  • access: public
string toUrl (string $url, array $parameters)
  • string $url: The request URL.
  • array $parameters: Array containing request parameters.
validateResponse (line 327)

Method to validate a response.

  • abstract:
  • throws: DomainException
  • since: 13.1
  • access: public
void validateResponse (string $url, JHttpResponse $response)
  • string $url: The request URL.
  • JHttpResponse $response: The response to validate.

Redefined in descendants as:
verifyCredentials (line 546)

Returns an HTTP 200 OK response code and a representation of the requesting user if authentication was successful; returns a 401 status code and an error message if not.

  • return: The decoded JSON response
  • abstract:
  • since: 13.1
  • access: public
array verifyCredentials ()

Redefined in descendants as:

Documentation generated on Tue, 19 Nov 2013 14:55:53 +0100 by phpDocumentor 1.4.3