MediaWiki  1.34.0
StaticBasicAuthorizer.php
Go to the documentation of this file.
1 <?php
2 
4 
7 
14  private $value;
15 
23  public function __construct( $value = null ) {
24  $this->value = $value;
25  }
26 
27  public function authorize( RequestInterface $request, Handler $handler ) {
28  return $this->value;
29  }
30 }
MediaWiki\Rest\Handler
Definition: HelloHandler.php:3
MediaWiki\Rest\BasicAccess\StaticBasicAuthorizer\__construct
__construct( $value=null)
Definition: StaticBasicAuthorizer.php:23
value
if( $inline) $status value
Definition: SyntaxHighlight.php:346
MediaWiki\Rest\BasicAccess
Definition: BasicAuthorizerBase.php:3
MediaWiki\Rest\BasicAccess\StaticBasicAuthorizer\authorize
authorize(RequestInterface $request, Handler $handler)
Determine whether a request should be permitted, given the handler's needsReadAccess() and needsWrite...
Definition: StaticBasicAuthorizer.php:27
MediaWiki\Rest\Handler
Definition: Handler.php:9
MediaWiki\Rest\BasicAccess\StaticBasicAuthorizer\$value
$value
Definition: StaticBasicAuthorizer.php:14
MediaWiki\Rest\RequestInterface
A request interface similar to PSR-7's ServerRequestInterface.
Definition: RequestInterface.php:39
MediaWiki\Rest\BasicAccess\StaticBasicAuthorizer
An authorizer which returns a value from authorize() which is given in the constructor.
Definition: StaticBasicAuthorizer.php:13
MediaWiki\Rest\BasicAccess\BasicAuthorizerInterface
An interface used by Router to ensure that the client has "basic" access, i.e.
Definition: BasicAuthorizerInterface.php:14