Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
RefreshToken | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
getGrant | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Extension\OAuth\AuthorizationProvider\Grant; |
4 | |
5 | use Exception; |
6 | use League\OAuth2\Server\Grant\GrantTypeInterface; |
7 | use League\OAuth2\Server\Grant\RefreshTokenGrant; |
8 | use MediaWiki\Extension\OAuth\AuthorizationProvider\AccessToken; |
9 | |
10 | class RefreshToken extends AccessToken { |
11 | |
12 | /** |
13 | * @return GrantTypeInterface |
14 | * @throws Exception |
15 | */ |
16 | protected function getGrant(): GrantTypeInterface { |
17 | return new RefreshTokenGrant( |
18 | $this->getRefreshTokenRepo() |
19 | ); |
20 | } |
21 | } |