Added missing methods to auth code storage interface

This commit is contained in:
Alex Bilbie 2014-05-03 11:39:11 +01:00
parent 62f5766908
commit 719b87a40c

View File

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