Header
in package
implements
Authentication
Table of Contents
Interfaces
- Authentication
- Add authentication information to a PSR-7 Request.
Properties
Methods
- __construct() : mixed
- authenticate() : RequestInterface
- Alter the request to add the authentication credentials.
Properties
$name
private
string
$name
$value
private
string|array<string|int, string>
$value
Methods
__construct()
public
__construct(string $name, string|array<string|int, string> $value) : mixed
Parameters
- $name : string
- $value : string|array<string|int, string>
authenticate()
Alter the request to add the authentication credentials.
public
authenticate(RequestInterface $request) : RequestInterface
To do that, the implementation might use pre-stored credentials or do separate HTTP requests to obtain a valid token.
Parameters
- $request : RequestInterface
-
The request without authentication information
Return values
RequestInterface —The request with added authentication information