MediaWiki  master
Go to the documentation of this file.
1 <?php
14 abstract class BasicAuthorizerBase implements BasicAuthorizerInterface {
15  public function authorize( RequestInterface $request, Handler $handler ) {
16  return $this->createRequestAuthorizer( $request, $handler )->authorize();
17  }
26  abstract protected function createRequestAuthorizer( RequestInterface $request,
27  Handler $handler ): BasicRequestAuthorizer;
28 }
An implementation of BasicAuthorizerInterface which creates a request-local object (a request authori...
authorize(RequestInterface $request, Handler $handler)
Determine whether a request should be permitted, given the handler's needsReadAccess() and needsWrite...
createRequestAuthorizer(RequestInterface $request, Handler $handler)
Create a BasicRequestAuthorizer to authorize the request.
A request authorizer which checks needsReadAccess() and needsWriteAccess() in the handler and calls i...
Base class for REST route handlers.
Definition: Handler.php:20
An interface used by Router to ensure that the client has "basic" access, i.e.
A request interface similar to PSR-7's ServerRequestInterface.
Copyright (C) 2011-2020 Wikimedia Foundation and others.