Class RESTful
Methods summary
public
boolean
|
#
createAccessToken( string $authToken, string $accessTokenSecret, string $timestamp, string $nonce, string $algo = 'sha1' )
create/return a access token from the passed parameter, timestamp and nonce increase the security and are recommended based on RFC 2617 ? HTTP Authentication: Basic and Digest Access Authentication (for more see the restful.server.complex.sample.php)
create/return a access token from the passed parameter, timestamp and nonce increase the security and are recommended based on RFC 2617 ? HTTP Authentication: Basic and Digest Access Authentication (for more see the restful.server.complex.sample.php)
Parameters
- $authToken
- $accessTokenSecret
- $timestamp
- UTC formated DateTime like "Thu, 26 Jul 2012 14:53:44 UTC"
- $nonce
- $algo
- for more see the php function "hash_algos"
Returns
boolean
|
public
array
|
#
createOAuthSignature( string $httpMethod, string $endponitURL, mixed $params, string $consumer_key, string $consumer_secret, string $auth_token, string $token_secret, integer $timestamp, string $nonce, string $algo = 'sha1' )
create a OAuth 1.0 signature
create a OAuth 1.0 signature
Parameters
- $httpMethod
- as POST or GET
- $endponitURL
- as sample http://rest.mydomain.org/get-host-info
- $params
- as sample array('userid'=>1,return=>name) or string like 'userid=1&return=name'
- $consumer_key
- $consumer_secret
- $auth_token
- could be empty if only consumer authentification is required
- $token_secret
- could be empty if only consumer authentification is required
- $timestamp
- as number of seconds since the Unix Epoch
- $nonce
- $algo
Returns
array
|