Documentation

Wsse
in package
implements Authentication

FinalYes

Authenticate a PSR-7 Request using WSSE.

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

$hashAlgorithm  : string
$password  : string
$username  : string

Methods

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

Properties

$hashAlgorithm

private string $hashAlgorithm

$password

private string $password

$username

private string $username

Methods

__construct()

public __construct(string $username, string $password[, string $hashAlgorithm = 'sha1' ]) : mixed
Parameters
$username : string
$password : string
$hashAlgorithm : string = 'sha1'

To use a better hashing algorithm than the weak sha1, pass the algorithm to use, e.g. "sha512"

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