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