diff --git a/src/JacobKiers/OAuth/DataStoreInterface.php b/src/JacobKiers/OAuth/DataStoreInterface.php index b201a41..0c7afe8 100644 --- a/src/JacobKiers/OAuth/DataStoreInterface.php +++ b/src/JacobKiers/OAuth/DataStoreInterface.php @@ -33,20 +33,20 @@ interface DataStoreInterface * Validate a token. * * @param JacobKiers\OAuth\Client $client - * @param JacobKiers\OAuth\Token $token - * @param string $token_type Request or access token + * @param string $token_type Request or access token + * @param string $token_key * * @return JacobKiers\OAuth\Token */ - public function lookupToken(Client $client, Token $token, $token_type); + public function lookupToken(Client $client, $token_type, $token_key); /** * Validate that a nonce has not been used with the same timestamp before. * * @param JacobKiers\OAuth\Client $client * @param JacobKiers\OAuth\Token $token - * @param string $nonce - * @param int $timestamp + * @param string $nonce + * @param int $timestamp * * @return boolean */ @@ -56,7 +56,7 @@ interface DataStoreInterface * Return a new token attached to this client. * * @param JacobKiers\OAuth\Client $client - * @param string $callback URI to store as the post-authorization callback. + * @param string $callback URI to send the post-authorisation callback to. * * @return JacobKiers\OAuth\Token */ @@ -70,7 +70,7 @@ interface DataStoreInterface * * @param JacobKiers\OAuth\Client $client * @param JacobKiers\OAuth\Token $token - * @param string $verifier + * @param string $verifier * * @return JacobKiers\OAuth\Token */ diff --git a/src/JacobKiers/OAuth/Server.php b/src/JacobKiers/OAuth/Server.php index 9dffdd4..e485ae7 100644 --- a/src/JacobKiers/OAuth/Server.php +++ b/src/JacobKiers/OAuth/Server.php @@ -121,7 +121,7 @@ class Server // Rev A change $verifier = $request->getOAuthVerifier(); - return $this->data_store->newAccessToken($token, $client, $verifier); + return $this->data_store->newAccessToken($client, $token, $verifier); } /** @@ -231,9 +231,9 @@ class Server */ private function getToken(RequestInterface $request, Client $client, $token_type = 'access') { - $token_field = $request instanceof RequestInterface ? $request->getOAuthToken() : null; + $token_key = $request instanceof RequestInterface ? $request->getOAuthToken() : null; - $token = $this->data_store->lookupToken($client, $token_type, $token_field); + $token = $this->data_store->lookupToken($client, $token_type, $token_key); if (!$token) { throw new OAuthException("Invalid $token_type token: $token_field"); }