MediaWiki master
MediaWiki\Rest\BasicAccess\BasicAuthorizerInterface Interface Reference

An interface used by Router to ensure that the client has "basic" access, i.e. More...

Inherited by MediaWiki\Rest\BasicAccess\BasicAuthorizerBase, MediaWiki\Rest\BasicAccess\CompoundAuthorizer, MediaWiki\Rest\BasicAccess\StaticBasicAuthorizer, and MediaWiki\Rest\CorsUtils.

Public Member Functions

 authorize (RequestInterface $request, Handler $handler)
 Determine whether a request should be permitted, given the handler's needsReadAccess() and needsWriteAccess().
 

Detailed Description

An interface used by Router to ensure that the client has "basic" access, i.e.

the ability to read or write to the wiki.

Access: internal

Definition at line 14 of file BasicAuthorizerInterface.php.

Member Function Documentation

◆ authorize()

MediaWiki\Rest\BasicAccess\BasicAuthorizerInterface::authorize ( RequestInterface  $request,
Handler  $handler 
)

Determine whether a request should be permitted, given the handler's needsReadAccess() and needsWriteAccess().

If the request should be permitted, return null. If the request should be denied, return a string error identifier.

Parameters
RequestInterface$request
Handler$handler
Returns
string|null If the request is denied, the string error code. If the request is allowed, null.

Implemented in MediaWiki\Rest\BasicAccess\BasicAuthorizerBase, MediaWiki\Rest\BasicAccess\CompoundAuthorizer, MediaWiki\Rest\BasicAccess\StaticBasicAuthorizer, and MediaWiki\Rest\CorsUtils.


The documentation for this interface was generated from the following file: