MediaWiki
REL1_35
BasicAuthorizerBase.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
14
abstract
class
BasicAuthorizerBase
implements
BasicAuthorizerInterface
{
15
public
function
authorize
(
RequestInterface
$request,
Handler
$handler ) {
16
return
$this->
createRequestAuthorizer
( $request, $handler )->authorize();
17
}
18
26
abstract
protected
function
createRequestAuthorizer
(
RequestInterface
$request,
27
Handler
$handler ) :
BasicRequestAuthorizer
;
28
}
MediaWiki\Rest\BasicAccess\BasicAuthorizerBase
An implementation of BasicAuthorizerInterface which creates a request-local object (a request authori...
Definition
BasicAuthorizerBase.php:14
MediaWiki\Rest\BasicAccess\BasicAuthorizerBase\authorize
authorize(RequestInterface $request, Handler $handler)
Determine whether a request should be permitted, given the handler's needsReadAccess() and needsWrite...
Definition
BasicAuthorizerBase.php:15
MediaWiki\Rest\BasicAccess\BasicAuthorizerBase\createRequestAuthorizer
createRequestAuthorizer(RequestInterface $request, Handler $handler)
Create a BasicRequestAuthorizer to authorize the request.
MediaWiki\Rest\BasicAccess\BasicRequestAuthorizer
A request authorizer which checks needsReadAccess() and needsWriteAccess() in the handler and calls i...
Definition
BasicRequestAuthorizer.php:15
MediaWiki\Rest\Handler
Base class for REST route handlers.
Definition
Handler.php:16
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
Definition
ActionModuleBasedHandler.php:3
includes
Rest
BasicAccess
BasicAuthorizerBase.php
Generated on Sat Apr 6 2024 00:07:42 for MediaWiki by
1.9.8