diff options
Diffstat (limited to 'OAuth/src/AuthorizationProvider/Grant/RefreshToken.php')
-rw-r--r-- | OAuth/src/AuthorizationProvider/Grant/RefreshToken.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/OAuth/src/AuthorizationProvider/Grant/RefreshToken.php b/OAuth/src/AuthorizationProvider/Grant/RefreshToken.php new file mode 100644 index 00000000..7fbec0cf --- /dev/null +++ b/OAuth/src/AuthorizationProvider/Grant/RefreshToken.php @@ -0,0 +1,21 @@ +<?php + +namespace MediaWiki\Extensions\OAuth\AuthorizationProvider\Grant; + +use Exception; +use League\OAuth2\Server\Grant\GrantTypeInterface; +use League\OAuth2\Server\Grant\RefreshTokenGrant; +use MediaWiki\Extensions\OAuth\AuthorizationProvider\AccessToken; + +class RefreshToken extends AccessToken { + + /** + * @return GrantTypeInterface + * @throws Exception + */ + protected function getGrant(): GrantTypeInterface { + return new RefreshTokenGrant( + $this->getRefreshTokenRepo() + ); + } +} |