Documentation

Matching
in package
implements Authentication

FinalYes

Authenticate a PSR-7 Request if the request is matching.

since since version 1.2, and will be removed in 2.0. Use instead.

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

$authentication  : Authentication
$matcher  : CallbackRequestMatcher

Methods

__construct()  : mixed
authenticate()  : RequestInterface
Alter the request to add the authentication credentials.
createUrlMatcher()  : self
Creates a matching authentication for an URL.

Properties

Methods

__construct()

public __construct(Authentication $authentication[, callable|null $matcher = null ]) : mixed
Parameters
$authentication : Authentication
$matcher : callable|null = null

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

createUrlMatcher()

Creates a matching authentication for an URL.

public static createUrlMatcher(Authentication $authentication, string $url) : self
Parameters
$authentication : Authentication
$url : string
Return values
self

        
On this page

Search results