PHP Class XeroPHP\Remote\OAuth\Client

It's loosely based on the functionality of the SimpleOAuth class, which comes in the recommended php developer kit.
Author: Michael Calcinai
Afficher le fichier Open project: calcinai/xero-php Class Usage Examples

Méthodes publiques

Méthode Description
__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.

Private Methods

Méthode Description
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.

Method Details

__construct() public méthode

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

getAuthorizeURL() public méthode

public getAuthorizeURL ( ) : string
Résultat string

getSBS() public méthode

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
Résultat string

getToken() public méthode

public getToken ( )

getTokenSecret() public méthode

public getTokenSecret ( )

getVerifier() public méthode

public getVerifier ( )

setToken() public méthode

public setToken ( $token )

setTokenSecret() public méthode

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

setVerifier() public méthode

public setVerifier ( $verifier )

sign() public méthode

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