3 namespace MediaWiki\Rest\BasicAccess
;
5 use MediaWiki\Rest\Handler
;
6 use MediaWiki\Rest\RequestInterface
;
9 * An interface used by Router to ensure that the client has "basic" access,
10 * i.e. the ability to read or write to the wiki.
14 interface BasicAuthorizerInterface
{
16 * Determine whether a request should be permitted, given the handler's
17 * needsReadAccess() and needsWriteAccess().
19 * If the request should be permitted, return null. If the request should
20 * be denied, return a string error identifier.
22 * @param RequestInterface $request
23 * @param Handler $handler
24 * @return string|null If the request is denied, the string error code. If
25 * the request is allowed, null.
27 public function authorize( RequestInterface
$request, Handler
$handler );