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