MediaWiki
1.34.0
|
An authorizer which returns a value from authorize() which is given in the constructor. More...
Public Member Functions | |
__construct ( $value=null) | |
authorize (RequestInterface $request, Handler $handler) | |
Determine whether a request should be permitted, given the handler's needsReadAccess() and needsWriteAccess(). More... | |
Private Attributes | |
$value | |
An authorizer which returns a value from authorize() which is given in the constructor.
Definition at line 13 of file StaticBasicAuthorizer.php.
MediaWiki\Rest\BasicAccess\StaticBasicAuthorizer::__construct | ( | $value = null | ) |
string | null | $value | The value returned by authorize(). If the request is denied, this is the string error code. If the request is allowed, it is null. |
Definition at line 23 of file StaticBasicAuthorizer.php.
References MediaWiki\Rest\BasicAccess\StaticBasicAuthorizer\$value, and value.
MediaWiki\Rest\BasicAccess\StaticBasicAuthorizer::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.
RequestInterface | $request | |
Handler | $handler |
Implements MediaWiki\Rest\BasicAccess\BasicAuthorizerInterface.
Definition at line 27 of file StaticBasicAuthorizer.php.
References MediaWiki\Rest\BasicAccess\StaticBasicAuthorizer\$value.
|
private |
Definition at line 14 of file StaticBasicAuthorizer.php.
Referenced by MediaWiki\Rest\BasicAccess\StaticBasicAuthorizer\__construct(), and MediaWiki\Rest\BasicAccess\StaticBasicAuthorizer\authorize().