Fr3nch13/CakePHP Utilities

Digest
in package

Digest authentication adapter for Cake\Http\Client

Generally not directly constructed, but instead used by when $options['auth']['type'] is 'digest'

Table of Contents

Properties

$_client  : Client
Instance of Cake\Http\Client

Methods

__construct()  : mixed
Constructor
authentication()  : Request
Add Authorization header to the request.
_generateHeader()  : string
Generate the header Authorization
_getServerInfo()  : array<string|int, mixed>
Retrieve information about the authentication

Properties

$_client

Instance of Cake\Http\Client

protected Client $_client

Methods

__construct()

Constructor

public __construct(Client $client[, array<string|int, mixed>|null $options = null ]) : mixed
Parameters
$client : Client

Http client object.

$options : array<string|int, mixed>|null = null

Options list.

_generateHeader()

Generate the header Authorization

protected _generateHeader(Request $request, array<string, mixed> $credentials) : string
Parameters
$request : Request

The request object.

$credentials : array<string, mixed>

Authentication credentials.

Return values
string

_getServerInfo()

Retrieve information about the authentication

protected _getServerInfo(Request $request, array<string|int, mixed> $credentials) : array<string|int, mixed>

Will get the realm and other tokens by performing another request without authentication to get authentication challenge.

Parameters
$request : Request

The request object.

$credentials : array<string|int, mixed>

Authentication credentials.

Return values
array<string|int, mixed>

modified credentials.


        
On this page

Search results