AuthenticationManager
Runs a firewall’s authenticator chain against a request and, on success, populates the request’s SecurityUser/RbacSecurityUser.
AuthN only — the existing authZ path (SecurityService/SecurityMiddleware) is unchanged and runs independently afterward.
Synopsis
Section titled “Synopsis”final class AuthenticationManager
| Since | 1.0.0 |
| Source | AuthenticationManager.php |
Constructor
Section titled “Constructor”__construct()
Section titled “__construct()”public function __construct(Controller $controller): mixed
The owning context’s Controller, used to reach its SecurityUser.
| Parameter | Type | Description |
|---|---|---|
$controller | Controller | The owning context’s Controller, used to reach its SecurityUser. |
Returns mixed
Methods
Section titled “Methods”| Method | Description |
|---|---|
authenticate(ServerRequestInterface $request, Firewall $firewall): ?Passport | Tries each of $firewall’s authenticators in declaration order and stops at the first one whose supports() matches $request. |
authenticate()
Section titled “authenticate()”public function authenticate(ServerRequestInterface $request, Firewall $firewall): ?Passport
Tries each of $firewall’s authenticators in declaration order and stops at the first one whose supports() matches $request.
The firewall matched for this request.
| Parameter | Type | Description |
|---|---|---|
$request | ServerRequestInterface | The incoming request. |
$firewall | Firewall | The firewall matched for this request. |
Returns ?Passport — The successful passport, or null if no authenticator supported this request.
| Throws | When |
|---|---|
AuthenticationException | If the matching authenticator’s credential was present but invalid. |