MediaWiki master
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...

Inherits MediaWiki\Rest\BasicAccess\BasicAuthorizerInterface.

Inherited by MediaWiki\Rest\BasicAccess\MWBasicAuthorizer.

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().
 

Protected Member Functions

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

Detailed Description

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

Access: internal

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

Create a BasicRequestAuthorizer to authorize the request.

Parameters
RequestInterface$request
Handler$handler
Returns
BasicRequestAuthorizer

Reimplemented in MediaWiki\Rest\BasicAccess\MWBasicAuthorizer.

Referenced by MediaWiki\Rest\BasicAccess\BasicAuthorizerBase\authorize().


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