for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace ByTIC\Hello\Models\AuthCodes;
use League\OAuth2\Server\Entities\AuthCodeEntityInterface;
use League\OAuth2\Server\Exception\UniqueTokenIdentifierConstraintViolationException;
use League\OAuth2\Server\Repositories\AuthCodeRepositoryInterface;
/**
* Class Tokens
* @package ByTIC\Auth\Models\Tokens
*
* @method AuthCode getNew()
*/
class AuthCodes extends \Nip\Records\RecordManager implements AuthCodeRepositoryInterface
{
* Creates a new AuthCode
* @return AuthCodeEntityInterface
public function getNewAuthCode()
// TODO: Implement getNewAuthCode() method.
}
* Persists a new auth code to permanent storage.
* @param AuthCodeEntityInterface $authCodeEntity
* @throws UniqueTokenIdentifierConstraintViolationException
public function persistNewAuthCode(AuthCodeEntityInterface $authCodeEntity)
// TODO: Implement persistNewAuthCode() method.
* Revoke an auth code.
* @param string $codeId
public function revokeAuthCode($codeId)
// TODO: Implement revokeAuthCode() method.
* Check if the auth code has been revoked.
* @return bool Return true if this code has been revoked
public function isAuthCodeRevoked($codeId)
// TODO: Implement isAuthCodeRevoked() method.
/** @noinspection PhpMissingParentCallCommonInspection
* @inheritDoc
protected function generateTable()
return 'oauth_auth_codes';