PHP Class WDS_WP_REST_API\OAuth1\WPServer

Inheritance: extends League\OAuth1\Client\Server\Server
ファイルを表示 Open project: webdevstudios/wds-wp-rest-api-connect

Public Properties

Property Type Description
$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 Properties

Property Type Description
$authURLs
$baseUri

Public Methods

Method Description
__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}

Protected Methods

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

Private Methods

Method Description
parseConfigurationArray ( array $configuration = [] ) Parse configuration array to set attributes.

Method Details

__construct() public method

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

authorize() public method

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

fetchUserDetails() protected method

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

getTemporaryCredentials() public method

Gets temporary credentials by performing a request to the server.
Since: 0.2.3
public getTemporaryCredentials ( ) : League\OAuth1\Client\Credentials\TemporaryCredentials
return League\OAuth1\Client\Credentials\TemporaryCredentials

getTokenCredentials() public method

Retrieves token credentials by passing in the temporary credentials, the temporary credentials identifier as passed back by the server and finally the verifier code.
Since: 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
return League\OAuth1\Client\Credentials\TokenCredentials

get_response() public method

Perform a GuzzleClient request, and get the response.
Since: 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.
return Guzzle\Http\Message\Response

handleTemporaryCredentialsFail() public method

Handle a failed response coming back when getting temporary credentials.
Since: 0.2.3
public handleTemporaryCredentialsFail ( Exception $e )
$e Exception

request() public method

Perform a request (via GuzzleClient)
Since: 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.
return array Array of response data, or WP_Error

urlAuthorization() public method

{@inheritDoc}
public urlAuthorization ( )

urlTemporaryCredentials() public method

{@inheritDoc}

urlTokenCredentials() public method

{@inheritDoc}
public urlTokenCredentials ( )

urlUserDetails() public method

{@inheritDoc}
public urlUserDetails ( )

userDetails() public method

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

userEmail() public method

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

userScreenName() public method

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

userUid() public method

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

Property Details

$authURLs protected_oe property

protected $authURLs

$baseUri protected_oe property

protected $baseUri

$response public_oe property

Guzzle\Http\Message\Response
public Guzzle\Http\Message\Response $response
return Guzzle\Http\Message\Response

$response_code public_oe property

If a request was made, the response code will be stored here.
public string $response_code
return string