From 11995764ba7b8b49fcdc42cbe89faf4a85a46c5d Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Fri, 6 Jul 2012 19:20:21 +0100 Subject: [PATCH] Added hasAccessToken query --- src/oauth2server/DbInterface.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/oauth2server/DbInterface.php b/src/oauth2server/DbInterface.php index 8f40a5dc..81ef9f07 100644 --- a/src/oauth2server/DbInterface.php +++ b/src/oauth2server/DbInterface.php @@ -39,6 +39,20 @@ interface OAuth2ServerDatabase string $authCode ); + /** + * Has access token + * + * Check if an access token exists for a user (or an application) + * + * @access public + * @return bool|string Return FALSE is a token doesn't exist or return the + * access token as a string + */ + public function hasAccessToken( + string $typeId, + string $clientId + ); + public function getAccessToken(int $sessionId); public function removeAuthCode(int $sessionId);