MediaWiki
master
StaticBasicAuthorizer.php
Go to the documentation of this file.
1
<?php
2
3
namespace
MediaWiki\Rest\BasicAccess
;
4
5
use
MediaWiki\Rest\Handler
;
6
use
MediaWiki\Rest\RequestInterface
;
7
13
class
StaticBasicAuthorizer
implements
BasicAuthorizerInterface
{
21
public
function
__construct
(
22
private
readonly ?
string
$value =
null
,
23
) {
24
}
25
27
public
function
authorize
(
RequestInterface
$request
,
Handler
$handler ) {
28
return
$this->value;
29
}
30
}
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\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\BasicAccess\StaticBasicAuthorizer\__construct
__construct(private readonly ?string $value=null,)
Definition
StaticBasicAuthorizer.php:21
MediaWiki\Rest\Handler
Base class for REST route handlers.
Definition
Handler.php:25
MediaWiki\Rest\BasicAccess\BasicAuthorizerInterface
An interface used by Router to ensure that the client has "basic" access, i.e.
Definition
BasicAuthorizerInterface.php:14
MediaWiki\Rest\RequestInterface
A request interface similar to PSR-7's ServerRequestInterface.
Definition
RequestInterface.php:39
MediaWiki\Rest\BasicAccess
Definition
BasicAuthorizerBase.php:3
MediaWiki\Rest\Handler
Copyright (C) 2011-2020 Wikimedia Foundation and others.
Definition
ActionModuleBasedHandler.php:3
$request
$request
Definition
opensearch_desc.php:26
includes
Rest
BasicAccess
StaticBasicAuthorizer.php
Generated on Fri Oct 16 2026 08:23:41 for MediaWiki by
1.10.0