Authenticator
Authentication plugin for the middleware dispatcher.
Instance Properties
| Name | Type | Summary |
|---|---|---|
$authUrl | string | |
$service | Service |
Constructors / Destructors
| Returns | Signature and Description |
|---|---|
void | __construct(, )Creates a new AuthPlugin. |
Instance Methods
| Returns | Signature and Description |
|---|---|
ResponseInterface | __invoke(, , )Allows a plugin to issue a response before the request is dispatched. |
int | Gets the plugin priority; larger means first. |
Property Details
$authUrl
protected
string $authUrl$service
protected
Service $serviceMethod Details
__construct
public function
__construct(Service $service, string $authUrl)Creates a new AuthPlugin.
| Name | Type | Description |
|---|---|---|
$service | Service | The auth service |
$authUrl | string | The URL for the standalone login form |
__invoke
public function
__invoke(ServerRequestInterface $request, ResponseInterface $response, (function(Request,Response):Response) $next)Allows a plugin to issue a response before the request is dispatched.
| Name | Type | Description |
|---|---|---|
$request | ServerRequestInterface | The server request |
$response | ResponseInterface | The response |
$next | (function(Request,Response):Response) |
| Type | Description |
|---|---|
ResponseInterface | The response |
getPriority
public function
getPriority()Gets the plugin priority; larger means first.
| Type | Description |
|---|---|
int | The plugin priority |