\JOAuth1Client
Joomla Platform class for interacting with an OAuth 1.0 and 1.0a server.
Synopsis
class JOAuth1Client
{
- // members
- protected JRegistry $options;
- protected $token;
- protected JHttp $client;
- protected JInput $input;
- protected JApplicationWeb $application;
- protected $version;
- // methods
- public void __construct()
- public array authenticate()
- private void _generateRequestToken()
- private void _authorise()
- private void _generateAccessToken()
- public JHttpResponse oauthRequest()
- public abstract void validateResponse()
- private string _createHeader()
- public string toUrl()
- private array _signRequest()
- private string _baseString()
- public string safeEncode()
- public static string generateNonce()
- private string _prepareSigningKey()
- public abstract array verifyCredentials()
- public mixed getOption()
- public JOAuth1Client setOption()
- public array getToken()
- public JOAuth1Client setToken()
Hierarchy
Members
protected
- $application — JApplicationWeb
- $client — JHttp
- $input — JInput
- $options — JRegistry
- $token — array
- $version — string
Methods
private
- _baseString() — Prepare the signature base string.
- _createHeader() — Method used to create the header for the POST request.
- _generateAccessToken() — Method used to get an access token.
- _generateRequestToken() — Method used to get a request token.
- _prepareSigningKey() — Prepares the OAuth signing key.
- _signRequest() — Method used to sign requests.
public
- __construct() — Constructor.
- authenticate() — Method to for the oauth flow.
- generateNonce() — Method used to generate the current nonce.
- getOption() — Get an option from the JOauth1aClient instance.
- getToken() — Get the oauth token key or secret.
- oauthRequest() — Method used to make an OAuth request.
- safeEncode() — Encodes the string or array passed in a way compatible with OAuth.
- setOption() — Set an option for the JOauth1aClient instance.
- setToken() — Set the oauth token.
- toUrl() — Method to create the URL formed string with the parameters.
- validateResponse() — Method to validate a response.
- verifyCredentials() — 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.