From 719b87a40cd8b08a11c932bcb38b87243a9f2674 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sat, 3 May 2014 11:39:11 +0100 Subject: [PATCH] Added missing methods to auth code storage interface --- src/Storage/AuthCodeInterface.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/Storage/AuthCodeInterface.php b/src/Storage/AuthCodeInterface.php index 0350abc5..78dcc703 100644 --- a/src/Storage/AuthCodeInterface.php +++ b/src/Storage/AuthCodeInterface.php @@ -11,6 +11,9 @@ namespace League\OAuth2\Server\Storage; +use League\OAuth2\Server\Entity\AuthCodeEntity; +use League\OAuth2\Server\Entity\ScopeEntity; + /** * Auth code storage interface */ @@ -22,4 +25,26 @@ interface AuthCodeInterface * @return \League\OAuth2\Server\Entity\AuthCodeEntity */ public function get($code); + + /** + * Get the scopes for an access token + * @param \League\OAuth2\Server\Entity\AuthCodeEntity $token The auth code + * @return array Array of \League\OAuth2\Server\Entity\ScopeEntity + */ + public function getScopes(AuthCodeEntity $token); + + /** + * Associate a scope with an acess token + * @param \League\OAuth2\Server\Entity\AuthCodeEntity $token The auth code + * @param \League\OAuth2\Server\Entity\ScopeEntity $scope The scope + * @return void + */ + public function associateScope(AuthCodeEntity $token, ScopeEntity $scope); + + /** + * Delete an access token + * @param \League\OAuth2\Server\Entity\AuthCodeEntity $token The access token to delete + * @return void + */ + public function delete(AuthCodeEntity $token); }