PHP Класс XeroPHP\Remote\OAuth\Client

It's loosely based on the functionality of the SimpleOAuth class, which comes in the recommended php developer kit.
Автор: Michael Calcinai
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( array $config )
getAuthorizeURL ( ) : string
getSBS ( ) : string Get the Signature Base String for signing.
getToken ( )
getTokenSecret ( )
getVerifier ( )
setToken ( $token )
setTokenSecret ( $secret ) Populated during 3-legged auth
setVerifier ( $verifier )
sign ( Request $request ) This actually signs the request.

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

Метод Описание
getCallback ( ) : string
getConsumerKey ( ) : string
getConsumerSecret ( ) : string
getNonce ( integer $length = 20 ) : string Generic nonce generating function for the request.
getOAuthParams ( ) : array Gets the skeleton Oauth parameter array.
getSignature ( ) : string Call the appropriate signature method's signing function.
getSignatureMethod ( ) : string
getSigningSecret ( ) : string This is the signing secret passed to HMAC and PLAINTEXT signing mechanisms.
getTimestamp ( ) : integer
resetOAuthParams ( ) Resets the instance for subsequent signing requests.

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

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

public __construct ( array $config )
$config array OAuth config

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

public getAuthorizeURL ( ) : string
Результат string

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

This is basically just all params (including the generated oauth ones) ordered by key, then concatenated with the method and URL GET&https%3A%2F%2Fapi.xero.com%2Fapi.xro%2F2.0%2FContacts&oauth_consumer etc.
public getSBS ( ) : string
Результат string

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

public getToken ( )

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

public getTokenSecret ( )

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

public getVerifier ( )

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

public setToken ( $token )

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

Populated during 3-legged auth
public setTokenSecret ( $secret )

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

public setVerifier ( $verifier )

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

It can be called multiple times (for different requests) on the same instance of the client. This method puts it in the oauth params in the Authorization header by default.
public sign ( Request $request )
$request XeroPHP\Remote\Request Request to sign