2013-12-24 17:02:34 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* OAuth 2.0 Refresh token storage interface
|
|
|
|
*
|
2014-01-08 16:15:29 +00:00
|
|
|
* @package league/oauth2-server
|
2013-12-24 17:02:34 +00:00
|
|
|
* @author Alex Bilbie <hello@alexbilbie.com>
|
2014-03-09 19:34:23 +00:00
|
|
|
* @copyright Copyright (c) Alex Bilbie
|
2013-12-24 17:02:34 +00:00
|
|
|
* @license http://mit-license.org/
|
2014-03-09 20:05:38 +00:00
|
|
|
* @link https://github.com/thephpleague/oauth2-server
|
2013-12-24 17:02:34 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
namespace League\OAuth2\Server\Storage;
|
|
|
|
|
2014-05-02 15:14:12 +01:00
|
|
|
use League\OAuth2\Server\Entity\RefreshTokenEntity;
|
|
|
|
|
2014-01-08 16:15:29 +00:00
|
|
|
/**
|
|
|
|
* Refresh token interface
|
|
|
|
*/
|
2014-11-07 02:31:37 +00:00
|
|
|
interface RefreshTokenInterface extends StorageInterface
|
2013-12-24 17:02:34 +00:00
|
|
|
{
|
2014-01-08 16:15:29 +00:00
|
|
|
/**
|
2014-05-02 15:14:12 +01:00
|
|
|
* Return a new instance of \League\OAuth2\Server\Entity\RefreshTokenEntity
|
2014-12-10 13:10:35 +00:00
|
|
|
*
|
|
|
|
* @param string $token
|
|
|
|
*
|
2014-05-02 15:14:12 +01:00
|
|
|
* @return \League\OAuth2\Server\Entity\RefreshTokenEntity
|
2014-01-08 16:15:29 +00:00
|
|
|
*/
|
2014-01-10 12:30:13 +00:00
|
|
|
public function get($token);
|
2014-01-08 16:15:29 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a new refresh token_name
|
2014-12-10 13:10:35 +00:00
|
|
|
*
|
|
|
|
* @param string $token
|
|
|
|
* @param integer $expireTime
|
|
|
|
* @param string $accessToken
|
|
|
|
*
|
2014-05-02 15:14:12 +01:00
|
|
|
* @return \League\OAuth2\Server\Entity\RefreshTokenEntity
|
2014-01-08 16:15:29 +00:00
|
|
|
*/
|
2014-01-10 12:30:13 +00:00
|
|
|
public function create($token, $expireTime, $accessToken);
|
2014-01-08 16:15:29 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Delete the refresh token
|
2014-12-10 13:10:35 +00:00
|
|
|
*
|
|
|
|
* @param \League\OAuth2\Server\Entity\RefreshTokenEntity $token
|
|
|
|
*
|
2014-01-08 16:15:29 +00:00
|
|
|
* @return void
|
|
|
|
*/
|
2014-05-02 15:14:12 +01:00
|
|
|
public function delete(RefreshTokenEntity $token);
|
2013-12-24 17:02:34 +00:00
|
|
|
}
|