mirror of
https://github.com/elyby/accounts.git
synced 2024-10-30 23:43:00 +05:30
26 lines
777 B
PHP
26 lines
777 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace api\components\OAuth2\Grants;
|
|
|
|
use League\OAuth2\Server\Entities\AccessTokenEntityInterface;
|
|
use League\OAuth2\Server\Entities\RefreshTokenEntityInterface;
|
|
use League\OAuth2\Server\Grant\RefreshTokenGrant as BaseRefreshTokenGrant;
|
|
|
|
class RefreshTokenGrant extends BaseRefreshTokenGrant {
|
|
|
|
/**
|
|
* Currently we're not rotating refresh tokens.
|
|
* So we overriding this method to always return null, which means,
|
|
* that refresh_token will not be issued.
|
|
*
|
|
* @param AccessTokenEntityInterface $accessToken
|
|
*
|
|
* @return RefreshTokenEntityInterface|null
|
|
*/
|
|
protected function issueRefreshToken(AccessTokenEntityInterface $accessToken): ?RefreshTokenEntityInterface {
|
|
return null;
|
|
}
|
|
|
|
}
|