MediaWiki  1.34.0
MediaWiki\Rest\BasicAccess\BasicAuthorizerBase Class Reference

An implementation of BasicAuthorizerInterface which creates a request-local object (a request authorizer) to do the actual authorization. More...

Inheritance diagram for MediaWiki\Rest\BasicAccess\BasicAuthorizerBase:
Collaboration diagram for MediaWiki\Rest\BasicAccess\BasicAuthorizerBase:

Public Member Functions

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

Protected Member Functions

 createRequestAuthorizer (RequestInterface $request, Handler $handler)
 Create a BasicRequestAuthorizer to authorize the request. More...
 

Detailed Description

An implementation of BasicAuthorizerInterface which creates a request-local object (a request authorizer) to do the actual authorization.

Definition at line 14 of file BasicAuthorizerBase.php.

Member Function Documentation

◆ authorize()

MediaWiki\Rest\BasicAccess\BasicAuthorizerBase::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.

Implements MediaWiki\Rest\BasicAccess\BasicAuthorizerInterface.

Definition at line 15 of file BasicAuthorizerBase.php.

References MediaWiki\Rest\BasicAccess\BasicAuthorizerBase\createRequestAuthorizer().

◆ createRequestAuthorizer()

MediaWiki\Rest\BasicAccess\BasicAuthorizerBase::createRequestAuthorizer ( RequestInterface  $request,
Handler  $handler 
)
abstractprotected

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