This commit is contained in:
Graham Campbell
2014-12-10 13:10:35 +00:00
parent 8075190e0c
commit a1726903b5
45 changed files with 416 additions and 109 deletions

View File

@@ -21,38 +21,48 @@ interface AccessTokenInterface extends StorageInterface
{
/**
* Get an instance of Entity\AccessTokenEntity
* @param string $token The access token
*
* @param string $token The access token
*
* @return \League\OAuth2\Server\Entity\AccessTokenEntity
*/
public function get($token);
/**
* Get the scopes for an access token
* @param \League\OAuth2\Server\Entity\AccessTokenEntity $token The access token
* @return array Array of \League\OAuth2\Server\Entity\ScopeEntity
*
* @param \League\OAuth2\Server\Entity\AccessTokenEntity $token The access token
*
* @return array Array of \League\OAuth2\Server\Entity\ScopeEntity
*/
public function getScopes(AccessTokenEntity $token);
/**
* Creates a new access token
* @param string $token The access token
* @param integer $expireTime The expire time expressed as a unix timestamp
* @param string|integer $sessionId The session ID
*
* @param string $token The access token
* @param integer $expireTime The expire time expressed as a unix timestamp
* @param string|integer $sessionId The session ID
*
* @return void
*/
public function create($token, $expireTime, $sessionId);
/**
* Associate a scope with an acess token
* @param \League\OAuth2\Server\Entity\AccessTokenEntity $token The access token
* @param \League\OAuth2\Server\Entity\ScopeEntity $scope The scope
*
* @param \League\OAuth2\Server\Entity\AccessTokenEntity $token The access token
* @param \League\OAuth2\Server\Entity\ScopeEntity $scope The scope
*
* @return void
*/
public function associateScope(AccessTokenEntity $token, ScopeEntity $scope);
/**
* Delete an access token
* @param \League\OAuth2\Server\Entity\AccessTokenEntity $token The access token to delete
*
* @param \League\OAuth2\Server\Entity\AccessTokenEntity $token The access token to delete
*
* @return void
*/
public function delete(AccessTokenEntity $token);