Compare commits

...

7 Commits

Author SHA1 Message Date
Jacob Kiers 95477a7710 Merge pull request #9 from jacobkiers/update-travis-configuration
Update travis configuration: test PHP 5.3-5.6; 7 and HHVM.
2015-10-02 15:50:51 +02:00
Jacob Kiers e507a5dc8b Update travis configuration
Test more PHP versions, in order to maintain compatibility. Also updates
the composer install command.

Signed-off-by: Jacob Kiers <jacob@jacobkiers.net>
2015-10-02 15:46:24 +02:00
Jacob Kiers 11f934ee88 Merge pull request #8 from jacobkiers/fix-7-abstract-class
Fix interface inheritance for PHP 5.3.0 - 5.3.8
2015-10-02 15:43:01 +02:00
Jacob Kiers 3099dcf617 Maintain compatibility for PHP 5.3.0 - 5.3.8
Interface inheritance is not possible before PHP 5.3.9. That is an
artefact of PHP bug 43200 (https://bugs.php.net/43200).

Since the composer.json states that the PHP versions >= 5.3.0 are
supported, we have to maintain compatibility with PHP 5.3.X.

Fixes: #7

Signed-off-by: Jacob Kiers <jacob@jacobkiers.net>
2015-10-02 15:34:34 +02:00
Jacob Kiers d2b3281815 Release 1.0.11
This release fixes a little bug in the exception that is thrown when an
invalid token is encountered.

Reported and fixed by @elieux.

Signed-off-by: Jacob Kiers <jacob@alphacomm.nl>
2015-07-16 16:06:29 +02:00
Jacob Kiers 999a007b3b Merge pull request #6 from elieux/master-fix1
Fix variable name when creating an "invalid token" exception
2015-07-16 16:04:50 +02:00
David Macek 3ef8e25bdb Fix variable name when creating an "invalid token" exception 2015-07-16 15:53:27 +02:00
4 changed files with 9 additions and 24 deletions

View File

@ -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

View File

@ -8,3 +8,4 @@ Andy Smith authored the original code (http://oauth.googlecode.com/svn/code/php/
* Jacob Kiers (@jacobkiers)
* Alexandru G. (@vimishor)
* Victor Bjelkholm (@VictorBjelkholm)
* David Macek (@elieux)

View File

@ -243,7 +243,7 @@ class Server
$token = $this->data_store->lookupToken($consumer, $token_type, $token_key);
if (!$token) {
throw new OAuthException("Invalid $token_type token: $token_field");
throw new OAuthException("Invalid $token_type token: $token_key");
}
return $token;
}

View File

@ -27,28 +27,6 @@ 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.
*