W3cubDocs

/CakePHP 4.1

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'

Method Summary

Method Detail

_generateHeader() protected

_generateHeader(string $user, string $pass)

Generate basic [proxy] authentication header

Parameters

string $user

Username.

string $pass

Password.

Returns

string

authentication() public

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

Add Authorization header to the request.

Parameters

\Cake\Http\Client\Request $request

Request instance.

array $credentials

Credentials.

Returns

\Cake\Http\Client\Request

The updated request.

See Also

https://www.ietf.org/rfc/rfc2617.txt

proxyAuthentication() public

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

Proxy Authentication

Parameters

\Cake\Http\Client\Request $request

Request instance.

array $credentials

Credentials.

Returns

\Cake\Http\Client\Request

The updated request.

See Also

https://www.ietf.org/rfc/rfc2617.txt

© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.1/class-Cake.Http.Client.Auth.Basic.html