PHP Class eZ\Publish\Core\REST\Client\HttpClient\Authentication\BasicAuth

Inheritance: implements eZ\Publish\Core\REST\Client\HttpClient
Mostra file Open project: ezsystems/ezpublish-kernel Class Usage Examples

Protected Properties

Property Type Description
$innerClient eZ\Publish\Core\REST\Client\HttpClient Inner HTTP client, performing the actual requests.
$password string Password for Basic Auth.
$username string User name for Basic Auth.

Public Methods

Method Description
__construct ( eZ\Publish\Core\REST\Client\HttpClient $innerClient, string $username, string $password ) Creates a new Basic Auth HTTP client.
request ( string $method, string $path, Message $message = null ) : Message Execute a HTTP request to the remote server.

Method Details

__construct() public method

Creates a new Basic Auth HTTP client.
public __construct ( eZ\Publish\Core\REST\Client\HttpClient $innerClient, string $username, string $password )
$innerClient eZ\Publish\Core\REST\Client\HttpClient
$username string
$password string

request() public method

Returns the result from the remote server. The client sets the correct headers for Basic Auth into the $message transmitted to the inner client.
public request ( string $method, string $path, Message $message = null ) : Message
$method string
$path string
$message eZ\Publish\Core\REST\Common\Message
return eZ\Publish\Core\REST\Common\Message

Property Details

$innerClient protected_oe property

Inner HTTP client, performing the actual requests.
protected HttpClient,eZ\Publish\Core\REST\Client $innerClient
return eZ\Publish\Core\REST\Client\HttpClient

$password protected_oe property

Password for Basic Auth.
protected string $password
return string

$username protected_oe property

User name for Basic Auth.
protected string $username
return string