* @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\Interfaces\AuthCodeEntityInterface; /** * Auth code storage interface */ interface AuthCodeRepositoryInterface extends RepositoryInterface { /** * Persists a new auth code to permanent storage * * @param \League\OAuth2\Server\Entities\Interfaces\AuthCodeEntityInterface $authCodeEntity */ public function persistNewAuthCode(AuthCodeEntityInterface $authCodeEntity); /** * Revoke an auth code * * @param string $codeId */ 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 */ public function isAuthCodeRevoked($codeId); }