Class Digest
Digest authentication adapter for Cake\Network\Http\Client
Generally not directly constructed, but instead used by Cake\Network\Http\Client when $options['auth']['type'] is 'digest'
Property Summary
- 
        $_client protectedCake\Network\Http\ClientInstance of Cake\Network\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\Network\Http\Client $client, array|null $options = null)Constructor
Parameters
- 
                Cake\Network\Http\Client$client
- Http client object. 
- 
                array|null$options optional
- Options list. 
_generateHeader() ¶ protected
_generateHeader(Cake\Network\Http\Request $request, array $credentials): stringGenerate the header Authorization
Parameters
- 
                Cake\Network\Http\Request$request
- The request object. 
- 
                array$credentials
- Authentication credentials. 
Returns
string_getServerInfo() ¶ protected
_getServerInfo(Cake\Network\Http\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\Network\Http\Request$request
- The request object. 
- 
                array$credentials
- Authentication credentials. 
Returns
arraymodified credentials.
authentication() ¶ public
authentication(Cake\Network\Http\Request $request, array $credentials): voidAdd Authorization header to the request.
Parameters
- 
                Cake\Network\Http\Request$request
- The request object. 
- 
                array$credentials
- Authentication credentials. 
Returns
void