2016-11-30 01:45:56 +05:30
|
|
|
<?php
|
2019-09-22 02:47:21 +05:30
|
|
|
declare(strict_types=1);
|
2016-11-30 01:45:56 +05:30
|
|
|
|
2019-09-22 02:47:21 +05:30
|
|
|
namespace api\components\OAuth2\Grants;
|
2017-06-17 23:35:36 +05:30
|
|
|
|
2019-09-22 02:47:21 +05:30
|
|
|
use League\OAuth2\Server\Entities\AccessTokenEntityInterface;
|
|
|
|
use League\OAuth2\Server\Entities\RefreshTokenEntityInterface;
|
|
|
|
use League\OAuth2\Server\Grant\RefreshTokenGrant as BaseRefreshTokenGrant;
|
2017-06-17 23:35:36 +05:30
|
|
|
|
2019-09-22 02:47:21 +05:30
|
|
|
class RefreshTokenGrant extends BaseRefreshTokenGrant {
|
2016-11-30 01:45:56 +05:30
|
|
|
|
2017-07-13 16:14:06 +05:30
|
|
|
/**
|
2019-09-22 02:47:21 +05:30
|
|
|
* 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.
|
2017-07-13 16:14:06 +05:30
|
|
|
*
|
2019-09-22 02:47:21 +05:30
|
|
|
* @param AccessTokenEntityInterface $accessToken
|
2017-07-13 16:14:06 +05:30
|
|
|
*
|
2019-09-22 02:47:21 +05:30
|
|
|
* @return RefreshTokenEntityInterface|null
|
2017-07-13 16:14:06 +05:30
|
|
|
*/
|
2019-09-22 02:47:21 +05:30
|
|
|
protected function issueRefreshToken(AccessTokenEntityInterface $accessToken): ?RefreshTokenEntityInterface {
|
|
|
|
return null;
|
2016-11-30 04:49:14 +05:30
|
|
|
}
|
|
|
|
|
2016-11-30 01:45:56 +05:30
|
|
|
}
|