Skip to content

SessionAuthenticationMiddleware

Runs the session/form-login firewall’s authenticator chain in before_action, after Quiote\Middleware\RoutingMiddleware (so SecurityUser is already rehydrated) and before Quiote\Middleware\SecurityMiddleware (so a successful login is visible to the authZ decision made later in the same request).

Registered by AuthPlugin with explicit after:/before: anchors rather than a bare phase/priority, so its position stays correct regardless of how other middleware are reordered.

final class SessionAuthenticationMiddleware implements MiddlewareInterface

ImplementsMiddlewareInterface
Since1.0.0
SourceMiddleware/SessionAuthenticationMiddleware.php

public function __construct(FirewallMap $firewalls, AuthenticationManager $manager): mixed

Runs the matched firewall’s authenticator chain.

ParameterTypeDescription
$firewallsFirewallMapThe configured firewalls, matched by request path.
$managerAuthenticationManagerRuns the matched firewall’s authenticator chain.

Returns mixed

MethodDescription
process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface

public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface

The next middleware in the pipeline.

ParameterTypeDescription
$requestServerRequestInterfaceThe incoming request.
$handlerRequestHandlerInterfaceThe next middleware in the pipeline.

Returns ResponseInterface — The next middleware’s response, or the firewall’s entry-point response on a failed login attempt.