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

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

Protected Properties

Свойство 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.

Méthodes publiques

Méthode 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 méthode

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 méthode

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
Résultat 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
Résultat eZ\Publish\Core\REST\Client\HttpClient

$password protected_oe property

Password for Basic Auth.
protected string $password
Résultat string

$username protected_oe property

User name for Basic Auth.
protected string $username
Résultat string