PHP Class QueryAuth\Request\RequestSigner

Afficher le fichier Open project: jeremykendall/query-auth

Méthodes publiques

Méthode 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 méthode

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

getKeyGenerator() public méthode

Gets instance of KeyGenerator
public getKeyGenerator ( ) : KeyGenerator
Résultat QueryAuth\KeyGenerator Instance of KeyGenerator

getSignature() public méthode

Get Signature
public getSignature ( ) : Signature
Résultat Signature Instance of the signature creation class

getTimestamp() public méthode

Returns GMT timestamp if timestamp has not been set.
public getTimestamp ( ) : integer
Résultat integer timestamp

setKeyGenerator() public méthode

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

setSignature() public méthode

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

setTimestamp() public méthode

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

signRequest() public méthode

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