The HMAC-SHA1 signature method uses the HMAC-SHA1 signature algorithm as defined in [RFC2104] where the Signature Base String is the text and the key is the concatenated values (each first encoded per Parameter Encoding) of the Consumer Secret and Token Secret, separated by an '&' character (ASCII code 38) even if empty.

  • Chapter 9.2 ("HMAC-SHA1")

 Methods

Build up the signature NOTE: The output of this function MUST NOT be urlencoded.

build_signature(\Moneybird\Lib\OAuthRequest $request, \Moneybird\Lib\OAuthConsumer $consumer, \Moneybird\Lib\OAuthToken $token) : string

the encoding is handled in OAuthRequest when the final request is serialized

Parameters

Returns

string

Verifies that a given signature is correct

check_signature(\Moneybird\Lib\OAuthRequest $request, \Moneybird\Lib\OAuthConsumer $consumer, \Moneybird\Lib\OAuthToken $token, string $signature) : bool
Inherited

inherited_from \Moneybird\Lib\OAuthSignatureMethod::check_signature()

Parameters

$signature

string

Returns

bool

Needs to return the name of the Signature Method (ie HMAC-SHA1)

get_name() : string

Returns

string