Documentation

QueryParam
in package
implements Authentication

FinalYes

Authenticate a PSR-7 Request by adding parameters to its query.

Note: Although in some cases it can be useful, we do not recommend using query parameters for authentication. Credentials in the URL is generally unsafe as they are not encrypted, anyone can see them.

Tags
author

Márk Sági-Kazár mark.sagikazar@gmail.com

Table of Contents

Interfaces

Authentication
Add authentication information to a PSR-7 Request.

Properties

$params  : array<string|int, mixed>

Methods

__construct()  : mixed
authenticate()  : RequestInterface
Alter the request to add the authentication credentials.

Properties

$params

private array<string|int, mixed> $params = []

Methods

__construct()

public __construct(array<string|int, mixed> $params) : mixed
Parameters
$params : array<string|int, mixed>

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


        
On this page

Search results