Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
MWBasicAuthorizer | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
createRequestAuthorizer | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Rest\BasicAccess; |
4 | |
5 | use MediaWiki\Permissions\Authority; |
6 | use MediaWiki\Rest\Handler; |
7 | use MediaWiki\Rest\RequestInterface; |
8 | |
9 | /** |
10 | * A factory for MWBasicRequestAuthorizer which passes through a UserIdentity. |
11 | * |
12 | * @internal |
13 | */ |
14 | class MWBasicAuthorizer extends BasicAuthorizerBase { |
15 | private Authority $authority; |
16 | |
17 | public function __construct( Authority $authority ) { |
18 | $this->authority = $authority; |
19 | } |
20 | |
21 | protected function createRequestAuthorizer( RequestInterface $request, |
22 | Handler $handler |
23 | ): BasicRequestAuthorizer { |
24 | return new MWBasicRequestAuthorizer( $request, $handler, $this->authority ); |
25 | } |
26 | } |