Skip to content

FirewallMap

An ordered list of Firewall definitions, matched by request path.

Shared by Quiote\Security\Auth\Middleware\StatelessAuthenticationMiddleware and Quiote\Security\Auth\Middleware\SessionAuthenticationMiddleware so both middleware placements agree on the same firewall configuration.

final class FirewallMap

Since1.0.0
SourceFirewallMap.php

public function __construct(array<Firewall> $firewalls): mixed

Checked in order; the first match wins.

ParameterTypeDescription
$firewallsarray``<Firewall>Checked in order; the first match wins.

Returns mixed

MethodDescription
all(): array<Firewall>
match(string $path): ?Firewall

public function all(): array<Firewall>

Returns array``<Firewall> — Every firewall in this map, in match order.

public function match(string $path): ?Firewall

The request path to match (e.g. $request->getUri()->getPath()).

ParameterTypeDescription
$pathstringThe request path to match (e.g. $request->getUri()->getPath()).

Returns ?Firewall — The first firewall whose pattern matches $path, or null if none match.