class Signer implements SignerInterface, LoggerAwareInterface

Traits

Basic Implementation of LoggerAwareInterface.

Methods

setLogger(LoggerInterface $logger)

Sets a logger.

__construct(string $client_id, string $client_secret)

Constructs a new instance of this class.

string
getSelfKey()

Gets the self key that was set in the constructor.

string
getClientId()

Gets the client key that was set in the constructor.

string
getClientSecret()

Gets the client secret that was set in the constructor.

string
sign(array $payload)

Sign the payload to produce a signature for its contents.

string
generateQueryStringParams(array $payload)

Signs and generates the query string URL parameters to use when making a request.

Details

in LoggerAwareTrait at line line 18
setLogger(LoggerInterface $logger)

Sets a logger.

Parameters

LoggerInterface $logger

at line line 56
__construct(string $client_id, string $client_secret)

Constructs a new instance of this class.

Parameters

string $client_id A string which is the public portion of the keypair identifying the client party. The pairing of the public and private portions of the keypair should only be known to the client party and the signing party.
string $client_secret A string which is the private portion of the keypair identifying the client party. The pairing of the public and private portions of the keypair should only be known to the client party and the signing party.

See also

http://php.net/hash_algos

at line line 74
string getSelfKey()

Gets the self key that was set in the constructor.

Return Value

string The self key.

at line line 83
string getClientId()

Gets the client key that was set in the constructor.

Return Value

string The client key.

at line line 92
string getClientSecret()

Gets the client secret that was set in the constructor.

Return Value

string The client secret.

at line line 101
string sign(array $payload)

Sign the payload to produce a signature for its contents.

Parameters

array $payload The data to generate a signature for.

Return Value

string The signature for the payload contents.

at line line 119
string generateQueryStringParams(array $payload)

Signs and generates the query string URL parameters to use when making a request.

If the client_secret key is provided, then it will be automatically excluded from the result.

Parameters

array $payload The data to generate a signature for.

Return Value

string The query string parameters to append to the end of a URL.