MediaWiki master
StaticBasicAuthorizer.php
Go to the documentation of this file.
1<?php
2
4
7
21 public function __construct(
22 private readonly ?string $value = null,
23 ) {
24 }
25
27 public function authorize( RequestInterface $request, Handler $handler ) {
28 return $this->value;
29 }
30}
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...
__construct(private readonly ?string $value=null,)
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.