Joomla CMS  3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
Tout Structures de données Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe JOAuth1Client
+ Graphe d'héritage de JOAuth1Client:

Fonctions membres publiques

 __construct (Registry $options=null, JHttp $client=null, JInput $input=null, JApplicationWeb $application=null, $version=null)
 
 authenticate ()
 
 oauthRequest ($url, $method, $parameters, $data=array(), $headers=array())
 
 validateResponse ($url, $response)
 
 toUrl ($url, $parameters)
 
 safeEncode ($data)
 
 verifyCredentials ()
 
 getOption ($key)
 
 setOption ($key, $value)
 
 getToken ()
 
 setToken ($token)
 

Fonctions membres publiques statiques

static generateNonce ()
 

Attributs protégés

 $options
 
 $token = array()
 
 $client
 
 $input
 
 $application
 
 $version
 

Fonctions membres privées

 _generateRequestToken ()
 
 _authorise ()
 
 _generateAccessToken ()
 
 _createHeader ($parameters)
 
 _signRequest ($url, $method, $parameters)
 
 _baseString ($url, $method, $parameters)
 
 _prepareSigningKey ()
 

Description détaillée

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

Depuis
3.2.0
Obsolète:
4.0 Use the joomla/oauth1 framework package that will be bundled instead

Documentation des constructeurs et destructeur

◆ __construct()

__construct ( Registry  $options = null,
JHttp  $client = null,
JInput  $input = null,
JApplicationWeb  $application = null,
  $version = null 
)

Constructor.

Paramètres
Registry$optionsOAuth1Client options object.
JHttp$clientThe HTTP client object.
JInput$inputThe input object
JApplicationWeb$applicationThe application object
string$versionSpecify the OAuth version. By default we are using 1.0a.
Depuis
3.2.0

Références $client, $input, $options, et $version.

Documentation des fonctions membres

◆ _authorise()

_authorise ( )
private

Method used to authorise the application.

Renvoie
void
Depuis
3.2.0

Références $url.

◆ _baseString()

_baseString (   $url,
  $method,
  $parameters 
)
private

Prepare the signature base string.

Paramètres
string$urlThe URL to sign.
string$methodThe request method.
array$parametersArray containing request parameters.
Renvoie
string The base string.
Depuis
3.2.0

Références $base, $key, $parameters, $params, $url, et $value.

◆ _createHeader()

_createHeader (   $parameters)
private

Method used to create the header for the POST request.

Paramètres
array$parametersArray containing request parameters.
Renvoie
string The header.
Depuis
3.2.0

Références $key, $parameters, et $value.

◆ _generateAccessToken()

_generateAccessToken ( )
private

Method used to get an access token.

Renvoie
void
Depuis
3.2.0

Références $parameters, et $params.

◆ _generateRequestToken()

_generateRequestToken ( )
private

Method used to get a request token.

Renvoie
void
Depuis
3.2.0
Exceptions
DomainException

Références $parameters, et $params.

◆ _prepareSigningKey()

_prepareSigningKey ( )
private

Prepares the OAuth signing key.

Renvoie
string The prepared signing key.
Depuis
3.2.0

◆ _signRequest()

_signRequest (   $url,
  $method,
  $parameters 
)
private

Method used to sign requests.

Paramètres
string$urlThe URL to sign.
string$methodThe request method.
array$parametersArray containing request parameters.
Renvoie
array
Depuis
3.2.0

Références $base, $parameters, et $url.

◆ authenticate()

authenticate ( )

Method to for the oauth flow.

Renvoie
array Contains access token key, secret and verifier.
Depuis
3.2.0
Exceptions
DomainException

Références null.

◆ generateNonce()

static generateNonce ( )
static

Method used to generate the current nonce.

Renvoie
string The current nonce.
Depuis
3.2.0

◆ getOption()

getOption (   $key)

Get an option from the JOauth1aClient instance.

Paramètres
string$keyThe name of the option to get
Renvoie
mixed The option value
Depuis
3.2.0

Références $key.

◆ getToken()

getToken ( )

Get the oauth token key or secret.

Renvoie
array The oauth token key and secret.
Depuis
3.2.0

◆ oauthRequest()

oauthRequest (   $url,
  $method,
  $parameters,
  $data = array(),
  $headers = array() 
)

Method used to make an OAuth request.

Paramètres
string$urlThe request URL.
string$methodThe request method.
array$parametersArray containing request parameters.
mixed$dataThe POST request data.
array$headersAn array of name-value pairs to include in the header of the request
Renvoie
JHttpResponse
Depuis
3.2.0
Exceptions
DomainException

Références $data, $parameters, et $url.

◆ safeEncode()

safeEncode (   $data)

Encodes the string or array passed in a way compatible with OAuth. If an array is passed each array value will will be encoded.

Paramètres
mixed$dataThe scalar or array to encode.
Renvoie
string $data encoded in a way compatible with OAuth.
Depuis
3.2.0

Références $data, et elseif.

◆ setOption()

setOption (   $key,
  $value 
)

Set an option for the JOauth1aClient instance.

Paramètres
string$keyThe name of the option to set
mixed$valueThe option value to set
Renvoie
JOAuth1Client This object for method chaining
Depuis
3.2.0

Références $key, et $value.

◆ setToken()

setToken (   $token)

Set the oauth token.

Paramètres
array$tokenThe access token key and secret.
Renvoie
JOAuth1Client This object for method chaining.
Depuis
3.2.0

◆ toUrl()

toUrl (   $url,
  $parameters 
)

Method to create the URL formed string with the parameters.

Paramètres
string$urlThe request URL.
array$parametersArray containing request parameters.
Renvoie
string The formed URL.
Depuis
3.2.0

Références $key, $parameters, $url, et $value.

◆ validateResponse()

validateResponse (   $url,
  $response 
)
abstract

Method to validate a response.

Paramètres
string$urlThe request URL.
JHttpResponse$responseThe response to validate.
Renvoie
void
Depuis
3.2.0
Exceptions
DomainException

◆ verifyCredentials()

verifyCredentials ( )
abstract

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.

Renvoie
array The decoded JSON response
Depuis
3.2.0

Documentation des champs

◆ $application

$application
protected

◆ $client

$client
protected

◆ $input

$input
protected

◆ $options

$options
protected

◆ $token

$token = array()
protected

◆ $version

$version
protected

La documentation de cette classe a été générée à partir du fichier suivant :