PHP Class QueryAuth\Request\RequestSigner

Show file Open project: jeremykendall/query-auth

Public Methods

Method Description
__construct ( QueryAuth\SignatureInterface $signature, KeyGenerator $keyGenerator ) Public constructor
getKeyGenerator ( ) : KeyGenerator Gets instance of KeyGenerator
getSignature ( ) : Signature Get Signature
getTimestamp ( ) : integer Get timestamp
setKeyGenerator ( KeyGenerator $keyGenerator ) Sets instance of KeyGenerator
setSignature ( QueryAuth\SignatureInterface $signature ) Set Signature
setTimestamp ( integer $timestamp ) Set timestamp
signRequest ( QueryAuth\Request\OutgoingRequestInterface $request, QueryAuth\Credentials\CredentialsInterface $credentials ) : void Sign request

Method Details

__construct() public method

Public constructor
public __construct ( QueryAuth\SignatureInterface $signature, KeyGenerator $keyGenerator )
$signature QueryAuth\SignatureInterface SingatureInterface
$keyGenerator QueryAuth\KeyGenerator Key generator

getKeyGenerator() public method

Gets instance of KeyGenerator
public getKeyGenerator ( ) : KeyGenerator
return QueryAuth\KeyGenerator Instance of KeyGenerator

getSignature() public method

Get Signature
public getSignature ( ) : Signature
return Signature Instance of the signature creation class

getTimestamp() public method

Returns GMT timestamp if timestamp has not been set.
public getTimestamp ( ) : integer
return integer timestamp

setKeyGenerator() public method

Sets instance of KeyGenerator
public setKeyGenerator ( KeyGenerator $keyGenerator )
$keyGenerator QueryAuth\KeyGenerator Instance of KeyGenerator

setSignature() public method

Set Signature
public setSignature ( QueryAuth\SignatureInterface $signature )
$signature QueryAuth\SignatureInterface Instance of the signature creation class

setTimestamp() public method

Set timestamp
public setTimestamp ( integer $timestamp )
$timestamp integer

signRequest() public method

Sign request
public signRequest ( QueryAuth\Request\OutgoingRequestInterface $request, QueryAuth\Credentials\CredentialsInterface $credentials ) : void
$request QueryAuth\Request\OutgoingRequestInterface Request
$credentials QueryAuth\Credentials\CredentialsInterface Credentials
return void