Class Digest
Digest authentication adapter for Cake\Http\Client
Generally not directly constructed, but instead used by {@link \Cake\Http\Client} when $options['auth']['type'] is 'digest'
Property Summary
- 
        $_client protectedCake\Http\ClientInstance of Cake\Http\Client 
Method Summary
- 
          __construct() publicConstructor 
- 
          _generateHeader() protectedGenerate the header Authorization 
- 
          _getServerInfo() protectedRetrieve information about the authentication 
- 
          authentication() publicAdd Authorization header to the request. 
Method Detail
__construct() ¶ public
__construct(Cake\Http\Client $client, array|null $options = null)Constructor
Parameters
- 
                Cake\Http\Client$client
- Http client object. 
- 
                array|null$options optional
- Options list. 
_generateHeader() ¶ protected
_generateHeader(Cake\Http\Client\Request $request, array<string, mixed> $credentials): stringGenerate the header Authorization
Parameters
- 
                Cake\Http\Client\Request$request
- The request object. 
- 
                array<string, mixed>$credentials
- Authentication credentials. 
Returns
string_getServerInfo() ¶ protected
_getServerInfo(Cake\Http\Client\Request $request, array $credentials): arrayRetrieve 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
arraymodified credentials.
authentication() ¶ public
authentication(Cake\Http\Client\Request $request, array<string, mixed> $credentials): Cake\Http\Client\RequestAdd Authorization header to the request.
Parameters
- 
                Cake\Http\Client\Request$request
- The request object. 
- 
                array<string, mixed>$credentials
- Authentication credentials. 
Returns
Cake\Http\Client\RequestThe updated request.
