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); }