PHP Класс WDS_WP_REST_API\OAuth1\WPServer

Наследование: extends League\OAuth1\Client\Server\Server
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$response Guzzle\Http\Message\Response Guzzle\Http\Message\Response
$response_code string If a request was made, the response code will be stored here.

Защищенные свойства (Protected)

Свойство Тип Описание
$authURLs
$baseUri

Открытые методы

Метод Описание
__construct ( $clientCredentials, SignatureInterface $signature = null ) {@inheritDoc}
authorize ( League\OAuth1\Client\Credentials\TemporaryCredentials | string $temporaryIdentifier ) Redirect the client to the authorization URL.
getTemporaryCredentials ( ) : League\OAuth1\Client\Credentials\TemporaryCredentials Gets temporary credentials by performing a request to the server.
getTokenCredentials ( League\OAuth1\Client\Credentials\TemporaryCredentials $temporaryCredentials, string $temporaryIdentifier, string $verifier ) : League\OAuth1\Client\Credentials\TokenCredentials Retrieves token credentials by passing in the temporary credentials, the temporary credentials identifier as passed back by the server and finally the verifier code.
get_response ( string $uri, array $args ) : Guzzle\Http\Message\Response Perform a GuzzleClient request, and get the response.
handleTemporaryCredentialsFail ( Exception $e ) Handle a failed response coming back when getting temporary credentials.
request ( string $uri, League\OAuth1\Client\Credentials\TokenCredentials $creds, array $args = [] ) : array Perform a request (via GuzzleClient)
urlAuthorization ( ) {@inheritDoc}
urlTemporaryCredentials ( ) {@inheritDoc}
urlTokenCredentials ( ) {@inheritDoc}
urlUserDetails ( ) {@inheritDoc}
userDetails ( $data, League\OAuth1\Client\Credentials\TokenCredentials $tokenCredentials ) {@inheritDoc}
userEmail ( $data, League\OAuth1\Client\Credentials\TokenCredentials $tokenCredentials ) {@inheritDoc}
userScreenName ( $data, League\OAuth1\Client\Credentials\TokenCredentials $tokenCredentials ) {@inheritDoc}
userUid ( $data, League\OAuth1\Client\Credentials\TokenCredentials $tokenCredentials ) {@inheritDoc}

Защищенные методы

Метод Описание
fetchUserDetails ( League\OAuth1\Client\Credentials\TokenCredentials $tokenCredentials, $force = true ) {@inheritDoc}

Приватные методы

Метод Описание
parseConfigurationArray ( array $configuration = [] ) Parse configuration array to set attributes.

Описание методов

__construct() публичный Метод

{@inheritDoc}
public __construct ( $clientCredentials, SignatureInterface $signature = null )
$signature SignatureInterface

authorize() публичный Метод

Redirect the client to the authorization URL.
public authorize ( League\OAuth1\Client\Credentials\TemporaryCredentials | string $temporaryIdentifier )
$temporaryIdentifier League\OAuth1\Client\Credentials\TemporaryCredentials | string

fetchUserDetails() защищенный Метод

{@inheritDoc}
protected fetchUserDetails ( League\OAuth1\Client\Credentials\TokenCredentials $tokenCredentials, $force = true )
$tokenCredentials League\OAuth1\Client\Credentials\TokenCredentials

getTemporaryCredentials() публичный Метод

Gets temporary credentials by performing a request to the server.
С версии: 0.2.3
public getTemporaryCredentials ( ) : League\OAuth1\Client\Credentials\TemporaryCredentials
Результат League\OAuth1\Client\Credentials\TemporaryCredentials

getTokenCredentials() публичный Метод

Retrieves token credentials by passing in the temporary credentials, the temporary credentials identifier as passed back by the server and finally the verifier code.
С версии: 0.2.3
public getTokenCredentials ( League\OAuth1\Client\Credentials\TemporaryCredentials $temporaryCredentials, string $temporaryIdentifier, string $verifier ) : League\OAuth1\Client\Credentials\TokenCredentials
$temporaryCredentials League\OAuth1\Client\Credentials\TemporaryCredentials
$temporaryIdentifier string
$verifier string
Результат League\OAuth1\Client\Credentials\TokenCredentials

get_response() публичный Метод

Perform a GuzzleClient request, and get the response.
С версии: 0.2.3
public get_response ( string $uri, array $args ) : Guzzle\Http\Message\Response
$uri string URI to request
$args array Array of data to send in request.
Результат Guzzle\Http\Message\Response

handleTemporaryCredentialsFail() публичный Метод

Handle a failed response coming back when getting temporary credentials.
С версии: 0.2.3
public handleTemporaryCredentialsFail ( Exception $e )
$e Exception

request() публичный Метод

Perform a request (via GuzzleClient)
С версии: 0.2.3
public request ( string $uri, League\OAuth1\Client\Credentials\TokenCredentials $creds, array $args = [] ) : array
$uri string URI to request
$creds League\OAuth1\Client\Credentials\TokenCredentials Request method. Defaults to GET
$args array Array of data to send in request.
Результат array Array of response data, or WP_Error

urlAuthorization() публичный Метод

{@inheritDoc}
public urlAuthorization ( )

urlTemporaryCredentials() публичный Метод

{@inheritDoc}

urlTokenCredentials() публичный Метод

{@inheritDoc}
public urlTokenCredentials ( )

urlUserDetails() публичный Метод

{@inheritDoc}
public urlUserDetails ( )

userDetails() публичный Метод

{@inheritDoc}
public userDetails ( $data, League\OAuth1\Client\Credentials\TokenCredentials $tokenCredentials )
$tokenCredentials League\OAuth1\Client\Credentials\TokenCredentials

userEmail() публичный Метод

{@inheritDoc}
public userEmail ( $data, League\OAuth1\Client\Credentials\TokenCredentials $tokenCredentials )
$tokenCredentials League\OAuth1\Client\Credentials\TokenCredentials

userScreenName() публичный Метод

{@inheritDoc}
public userScreenName ( $data, League\OAuth1\Client\Credentials\TokenCredentials $tokenCredentials )
$tokenCredentials League\OAuth1\Client\Credentials\TokenCredentials

userUid() публичный Метод

{@inheritDoc}
public userUid ( $data, League\OAuth1\Client\Credentials\TokenCredentials $tokenCredentials )
$tokenCredentials League\OAuth1\Client\Credentials\TokenCredentials

Описание свойств

$authURLs защищенное свойство

protected $authURLs

$baseUri защищенное свойство

protected $baseUri

$response публичное свойство

Guzzle\Http\Message\Response
public Guzzle\Http\Message\Response $response
Результат Guzzle\Http\Message\Response

$response_code публичное свойство

If a request was made, the response code will be stored here.
public string $response_code
Результат string