JLinkedinOauth

Extends \JOAuth1Client

Joomla Platform class for generating Linkedin API access token.

since

3.2.0

package

Joomla.Platform

Methods

__construct

Constructor.

__construct(\Joomla\Registry\Registry $options = null, \JHttp $client = null, \JInput $input = null, \JApplicationWeb $application = null, string $version = null) 
inherited
since

3.2.0

Arguments

$options

\Joomla\Registry\RegistryOAuth1Client options object.

$client

\JHttpThe HTTP client object.

$input

\JInputThe input object

$application

\JApplicationWebThe application object

$version

stringSpecify the OAuth version. By default we are using 1.0a.

_authorise

Method used to authorise the application.

_authorise() : void
inherited
since

3.2.0

_baseString

Prepare the signature base string.

_baseString(string $url, string $method, array $parameters) : string
inherited
since

3.2.0

Arguments

$url

stringThe URL to sign.

$method

stringThe request method.

$parameters

arrayArray containing request parameters.

Response

stringThe base string.

_createHeader

Method used to create the header for the POST request.

_createHeader(array $parameters) : string
inherited
since

3.2.0

Arguments

$parameters

arrayArray containing request parameters.

Response

stringThe header.

_generateAccessToken

Method used to get an access token.

_generateAccessToken() : void
inherited
since

3.2.0

_generateRequestToken

Method used to get a request token.

_generateRequestToken() : void
inherited
since

3.2.0

throws

\DomainException

_prepareSigningKey

Prepares the OAuth signing key.

_prepareSigningKey() : string
inherited
since

3.2.0

Response

stringThe prepared signing key.

_signRequest

Method used to sign requests.

_signRequest(string $url, string $method, array $parameters) : array
inherited
since

3.2.0

Arguments

$url

stringThe URL to sign.

$method

stringThe request method.

$parameters

arrayArray containing request parameters.

Response

array

authenticate

Method to for the oauth flow.

authenticate() : array
inherited
since

3.2.0

throws

\DomainException

Response

arrayContains access token key, secret and verifier.

generateNonce

Method used to generate the current nonce.

generateNonce() : string
inherited static
since

3.2.0

Response

stringThe current nonce.

getOption

Get an option from the JOauth1aClient instance.

getOption(string $key) : mixed
inherited
since

3.2.0

Arguments

$key

stringThe name of the option to get

Response

mixedThe option value

getScope

Method to get the current scope

getScope() : string
since

3.2.0

Response

stringString or an array of string containing permissions.

getToken

Get the oauth token key or secret.

getToken() : array
inherited
since

3.2.0

Response

arrayThe oauth token key and secret.

oauthRequest

Method used to make an OAuth request.

oauthRequest(string $url, string $method, array $parameters, mixed $data = array(), array $headers = array()) : \JHttpResponse
inherited
since

3.2.0

throws

\DomainException

Arguments

$url

stringThe request URL.

$method

stringThe request method.

$parameters

arrayArray containing request parameters.

$data

mixedThe POST request data.

$headers

arrayAn array of name-value pairs to include in the header of the request

Response

\JHttpResponse

safeEncode

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

safeEncode(mixed $data) : string
inherited

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

since

3.2.0

Arguments

$data

mixedThe scalar or array to encode.

Response

string$data encoded in a way compatible with OAuth.

setOption

Set an option for the JOauth1aClient instance.

setOption(string $key, mixed $value) : \JOAuth1Client
inherited
since

3.2.0

Arguments

$key

stringThe name of the option to set

$value

mixedThe option value to set

Response

\JOAuth1ClientThis object for method chaining

setScope

Method used to set permissions.

setScope(mixed $scope) : \JLinkedinOauth
link

https://developer.linkedin.com/documents/authentication

since

3.2.0

Arguments

$scope

mixedString or an array of string containing permissions.

Response

\JLinkedinOauthThis object for method chaining

setToken

Set the oauth token.

setToken(array $token) : \JOAuth1Client
inherited
since

3.2.0

Arguments

$token

arrayThe access token key and secret.

Response

\JOAuth1ClientThis object for method chaining.

toUrl

Method to create the URL formed string with the parameters.

toUrl(string $url, array $parameters) : string
inherited
since

3.2.0

Arguments

$url

stringThe request URL.

$parameters

arrayArray containing request parameters.

Response

stringThe formed URL.

validateResponse

Method to validate a response.

validateResponse(string $url, \JHttpResponse $response) : void
inherited abstract
since

3.2.0

throws

\DomainException

Arguments

$url

stringThe request URL.

$response

\JHttpResponseThe response to validate.

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.

verifyCredentials() : array
inherited abstract
since

3.2.0

Response

arrayThe decoded JSON response

Properties

options

Options for the JOAuth1Client object.

inherited
since

3.2.0

Type(s)

\Joomla\Registry\Registry

token

Contains access token key, secret and verifier.

inherited
since

3.2.0

Type(s)

array

client

The HTTP client object to use in sending HTTP requests.

inherited
since

3.2.0

Type(s)

\JHttp

input

The input object to use in retrieving GET/POST data.

inherited
since

3.2.0

Type(s)

\JInput

application

The application object to send HTTP headers for redirects.

inherited
since

3.2.0

Type(s)

\JApplicationWeb

version

Selects which version of OAuth to use: 1.0 or 1.0a.

inherited
since

3.2.0

Type(s)

string