MediaWiki master
StaticBasicAuthorizer.php
Go to the documentation of this file.
1<?php
2
4
7
15 private $value;
16
24 public function __construct( $value = null ) {
25 $this->value = $value;
26 }
27
28 public function authorize( RequestInterface $request, Handler $handler ) {
29 return $this->value;
30 }
31}
An authorizer which returns a value from authorize() which is given in the constructor.
authorize(RequestInterface $request, Handler $handler)
Determine whether a request should be permitted, given the handler's needsReadAccess() and needsWrite...
Base class for REST route handlers.
Definition Handler.php:25
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.