[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/joomla/oauth1/src/ -> Client.php (summary)

Part of the Joomla Framework OAuth1 Package

Copyright: Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved.
License: GNU General Public License version 2 or later; see LICENSE
File Size: 600 lines (14 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 17 functions

  __construct()
  authenticate()
  generateRequestToken()
  authorise()
  generateAccessToken()
  oauthRequest()
  createHeader()
  toUrl()
  signRequest()
  baseString()
  safeEncode()
  generateNonce()
  prepareSigningKey()
  getOption()
  setOption()
  getToken()
  setToken()

Functions
Functions that are not part of a class:

__construct(SessionAwareWebApplicationInterface $application,Http $client = null,Input $input = null,$options = [],$version = '1.0a')   X-Ref
Constructor.

param: SessionAwareWebApplicationInterface  $application  The application object
param: Http                                 $client       The HTTP client object.
param: Input                                $input        The input object
param: array|\ArrayAccess                   $options      OAuth1 Client options.
param: string                               $version      Specify the OAuth version. By default we are using 1.0a.

authenticate()   X-Ref
Method to form the oauth flow.

return: array|null  The access token.

generateRequestToken()   X-Ref
Method used to get a request token.

return: void

authorise()   X-Ref
Method used to authorise the application.

return: void

generateAccessToken()   X-Ref
Method used to get an access token.

return: void

oauthRequest($url, $method, $parameters, $data = [], $headers = [])   X-Ref
Method used to make an OAuth request.

param: string  $url         The request URL.
param: string  $method      The request method.
param: array   $parameters  Array containing request parameters.
param: mixed   $data        The POST request data.
param: array   $headers     An array of name-value pairs to include in the header of the request
return: \Joomla\Http\Response

createHeader(array $parameters)   X-Ref
Method used to create the header for the POST request.

param: array  $parameters  Array containing request parameters.
return: string  The header.

toUrl($url, $parameters)   X-Ref
Method to create the URL formed string with the parameters.

param: string  $url         The request URL.
param: array   $parameters  Array containing request parameters.
return: string  The formed URL.

signRequest(string $url, string $method, array $parameters)   X-Ref
Method used to sign requests.

param: string  $url         The URL to sign.
param: string  $method      The request method.
param: array   $parameters  Array containing request parameters.
return: array  The array containing the request parameters, including signature.

baseString(string $url, string $method, array $parameters)   X-Ref
Prepare the signature base string.

param: string  $url         The URL to sign.
param: string  $method      The request method.
param: array   $parameters  Array containing request parameters.
return: string  The base string.

safeEncode($data)   X-Ref
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: mixed  $data  The scalar or array to encode.
return: string  $data encoded in a way compatible with OAuth.

generateNonce()   X-Ref
Method used to generate the current nonce.

return: string  The current nonce.

prepareSigningKey()   X-Ref
Prepares the OAuth signing key.

return: string  The prepared signing key.

getOption($key, $default = null)   X-Ref
Get an option from the OAuth1 Client instance.

param: string  $key      The name of the option to get
param: mixed   $default  Optional default value if the option does not exist
return: mixed  The option value

setOption($key, $value)   X-Ref
Set an option for the OAuth1 Client instance.

param: string  $key    The name of the option to set
param: mixed   $value  The option value to set
return: $this

getToken()   X-Ref
Get the oauth token key or secret.

return: array  The oauth token key and secret.

setToken($token)   X-Ref
Set the oauth token.

param: array  $token  The access token key and secret.
return: $this



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer