MediaWiki  master
MWBasicAuthorizer.php
Go to the documentation of this file.
1 <?php
2 
4 
8 
16  private $authority;
17 
18  public function __construct( Authority $authority ) {
19  $this->authority = $authority;
20  }
21 
22  protected function createRequestAuthorizer( RequestInterface $request,
23  Handler $handler
25  return new MWBasicRequestAuthorizer( $request, $handler, $this->authority );
26  }
27 }
MediaWiki\Rest\Handler
Definition: AbstractContributionHandler.php:3
MediaWiki\Rest\BasicAccess\MWBasicAuthorizer
A factory for MWBasicRequestAuthorizer which passes through a UserIdentity.
Definition: MWBasicAuthorizer.php:14
MediaWiki\Rest\BasicAccess
Definition: BasicAuthorizerBase.php:3
MediaWiki\Rest\BasicAccess\MWBasicAuthorizer\__construct
__construct(Authority $authority)
Definition: MWBasicAuthorizer.php:18
MediaWiki\Rest\Handler
Base class for REST route handlers.
Definition: Handler.php:17
MediaWiki\Rest\BasicAccess\MWBasicRequestAuthorizer
The concrete implementation of basic read/write restrictions in MediaWiki.
Definition: MWBasicRequestAuthorizer.php:14
MediaWiki\Rest\BasicAccess\BasicRequestAuthorizer
A request authorizer which checks needsReadAccess() and needsWriteAccess() in the handler and calls i...
Definition: BasicRequestAuthorizer.php:15
MediaWiki\Rest\BasicAccess\MWBasicAuthorizer\$authority
Authority $authority
Definition: MWBasicAuthorizer.php:16
MediaWiki\Permissions\Authority
This interface represents the authority associated the current execution context, such as a web reque...
Definition: Authority.php:37
MediaWiki\Rest\RequestInterface
A request interface similar to PSR-7's ServerRequestInterface.
Definition: RequestInterface.php:39
MediaWiki\Rest\BasicAccess\MWBasicAuthorizer\createRequestAuthorizer
createRequestAuthorizer(RequestInterface $request, Handler $handler)
Create a BasicRequestAuthorizer to authorize the request.
Definition: MWBasicAuthorizer.php:22
MediaWiki\Rest\BasicAccess\BasicAuthorizerBase
An implementation of BasicAuthorizerInterface which creates a request-local object (a request authori...
Definition: BasicAuthorizerBase.php:14