diff --git a/src/Repositories/AbstractAccessTokenRepository.php b/src/Repositories/AbstractAccessTokenRepository.php deleted file mode 100644 index 8c5c5948..00000000 --- a/src/Repositories/AbstractAccessTokenRepository.php +++ /dev/null @@ -1,46 +0,0 @@ - - * @copyright Copyright (c) Alex Bilbie - * @license http://mit-license.org/ - * - * @link https://github.com/thephpleague/oauth2-server - */ -namespace League\OAuth2\Server\Repositories; - -use League\OAuth2\Server\Entities\AuthCodeEntity; -use League\OAuth2\Server\Entities\AuthCodeEntityInterface; - -/** - * Auth code storage abstract class. - */ -abstract class AbstractAuthCodeRepository implements AuthCodeRepositoryInterface -{ - /** - * Creates a new AuthCode - * - * @return \League\OAuth2\Server\Entities\AuthCodeEntityInterface - */ - public function getNewAuthCode() - { - return new AuthCodeEntity(); - } - - /** - * Persists a new auth code to permanent storage. - * - * @param \League\OAuth2\Server\Entities\AuthCodeEntityInterface $authCodeEntity - */ - abstract public function persistNewAuthCode(AuthCodeEntityInterface $authCodeEntity); - - /** - * Revoke an auth code. - * - * @param string $codeId - */ - abstract public function revokeAuthCode($codeId); - - /** - * Check if the auth code has been revoked. - * - * @param string $codeId - * - * @return bool Return true if this code has been revoked - */ - abstract public function isAuthCodeRevoked($codeId); -} diff --git a/src/Repositories/AbstractRefreshTokenRepository.php b/src/Repositories/AbstractRefreshTokenRepository.php deleted file mode 100644 index 04748b2d..00000000 --- a/src/Repositories/AbstractRefreshTokenRepository.php +++ /dev/null @@ -1,53 +0,0 @@ - - * @copyright Copyright (c) Alex Bilbie - * @license http://mit-license.org/ - * - * @link https://github.com/thephpleague/oauth2-server - */ -namespace League\OAuth2\Server\Repositories; - -use League\OAuth2\Server\Entities\RefreshTokenEntityInterface; -use League\OAuth2\Server\Entities\RefreshTokenEntity; - -/** - * Refresh token abstract class. - */ -abstract class AbstractRefreshTokenRepository implements RefreshTokenRepositoryInterface -{ - /** - * Creates a new refresh token - * - * @return RefreshTokenEntityInterface - */ - public function getNewRefreshToken() - { - return new RefreshTokenEntity(); - } - - /** - * Create a new refresh token_name. - * - * @param \League\OAuth2\Server\Entities\RefreshTokenEntityInterface $refreshTokenEntity - */ - abstract public function persistNewRefreshToken(RefreshTokenEntityInterface $refreshTokenEntity); - - /** - * Revoke the refresh token. - * - * @param string $tokenId - */ - abstract public function revokeRefreshToken($tokenId); - - /** - * Check if the refresh token has been revoked. - * - * @param string $tokenId - * - * @return bool Return true if this token has been revoked - */ - abstract public function isRefreshTokenRevoked($tokenId); -}