Class Basic
Basic authentication adapter for Cake\Network\Http\Client
Generally not directly constructed, but instead used by Cake\Network\Http\Client when $options['auth']['type'] is 'basic'
Namespace: Cake\Network\Http\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\Network\Http\Request $request, array $credentials): void
Add Authorization header to the request.
Parameters
-
Cake\Network\Http\Request
$request Request instance.
-
array
$credentials Credentials.
Returns
void
See Also
http://www.ietf.org/rfc/rfc2617.txt
proxyAuthentication() ¶ public
proxyAuthentication(Cake\Network\Http\Request $request, array $credentials): void
Proxy Authentication
Parameters
-
Cake\Network\Http\Request
$request Request instance.
-
array
$credentials Credentials.
Returns
void
See Also
http://www.ietf.org/rfc/rfc2617.txt