\Cake\Http\Client\AuthDigest

Digest authentication adapter for Cake\Http\Client

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

Summary

Methods
Properties
Constants
__construct()
authentication()
No public properties found
No constants found
_getServerInfo()
_generateHeader()
$_client
N/A
No private methods found
No private properties found
N/A

Properties

$_client

$_client : \Cake\Http\Client

Instance of Cake\Http\Client

Type

\Cake\Http\Client

Methods

__construct()

__construct(\Cake\Http\Client  $client, array|null  $options = null) 

Constructor

Parameters

\Cake\Http\Client $client

Http client object.

array|null $options

Options list.

authentication()

authentication(\Cake\Http\Client\Request  $request, array  $credentials) : \Cake\Http\Client\Request

Add Authorization header to the request.

Parameters

\Cake\Http\Client\Request $request

The request object.

array $credentials

Authentication credentials.

Returns

\Cake\Http\Client\Request

The updated request.

_getServerInfo()

_getServerInfo(\Cake\Http\Client\Request  $request, array  $credentials) : array

Retrieve information about the authentication

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

Parameters

\Cake\Http\Client\Request $request

The request object.

array $credentials

Authentication credentials.

Returns

array —

modified credentials.

_generateHeader()

_generateHeader(\Cake\Http\Client\Request  $request, array  $credentials) : string

Generate the header Authorization

Parameters

\Cake\Http\Client\Request $request

The request object.

array $credentials

Authentication credentials.

Returns

string