Class Basic
Basic authentication adapter for Cake\Http\Client
Generally not directly constructed, but instead used by Cake\Http\Client when $options['auth']['type'] is 'basic'
Namespace: Cake\Http\Client\Auth
Method Summary
-
_generateHeader() protected
Generate basic [proxy] authentication header
-
authentication() public
Add Authorization header to the request.
-
proxyAuthentication() public
Proxy Authentication
Method Detail
_generateHeader() ¶ protected
_generateHeader(string $user, string $pass): string
Generate basic [proxy] authentication header
Parameters
-
string
$user Username.
-
string
$pass Password.
Returns
string
authentication() ¶ public
authentication(Cake\Http\Client\Request $request, array $credentials): Cake\Http\Client\Request
Add Authorization header to the request.
Parameters
-
Cake\Http\Client\Request
$request Request instance.
-
array
$credentials Credentials.
Returns
Cake\Http\Client\Request
See Also
http://www.ietf.org/rfc/rfc2617.txt
proxyAuthentication() ¶ public
proxyAuthentication(Cake\Http\Client\Request $request, array $credentials): Cake\Http\Client\Request
Proxy Authentication
Parameters
-
Cake\Http\Client\Request
$request Request instance.
-
array
$credentials Credentials.
Returns
Cake\Http\Client\Request
See Also
http://www.ietf.org/rfc/rfc2617.txt