diff --git a/.travis.yml b/.travis.yml index 434d1af..1f2cff1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,15 @@ +sudo: false + language: php php: + - 5.3 - 5.4 - 5.5 + - 5.6 + - 7 + - hhvm before_script: - composer selfupdate --quiet - - composer install --dev + - composer install --prefer-dist - vendor/phpunit/phpunit/composer/bin/phpunit diff --git a/src/JacobKiers/OAuth/SignatureMethod/SignatureMethod.php b/src/JacobKiers/OAuth/SignatureMethod/SignatureMethod.php index 74a833b..067b5d1 100644 --- a/src/JacobKiers/OAuth/SignatureMethod/SignatureMethod.php +++ b/src/JacobKiers/OAuth/SignatureMethod/SignatureMethod.php @@ -27,6 +27,28 @@ use \JacobKiers\OAuth\Request\RequestInterface; */ abstract class SignatureMethod implements SignatureMethodInterface { + /** + * Return the name of the Signature Method (ie HMAC-SHA1). + * + * @return string + */ + abstract public function getName(); + + /** + * Build up the signature. + * + * NOTE: The output of this function MUST NOT be urlencoded. + * the encoding is handled in OAuthRequest when the final + * request is serialized. + * + * @param JacobKiers\OAuth\Request\RequestInterface $request + * @param JacobKiers\OAuth\Consumer\ConsumerInterface $consumer + * @param JacobKiers\OAuth\Token\TokenInterface $token + * + * @return string + */ + abstract public function buildSignature(RequestInterface $request, ConsumerInterface $consumer, TokenInterface $token = null); + /** * Get the signature key, made up of consumer and optionally token shared secrets. *