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

Note: DO NOT USE THIS IN PRODUCTION.
Inheritance: implements eZ\Publish\Core\REST\Client\HttpClient, implements eZ\Publish\Core\REST\Client\Sessionable
Show file Open project: ezsystems/ezpublish-kernel

Protected Properties

Property Type Description
$innerClient eZ\Publish\Core\REST\Client\HttpClient Inner HTTP client, performing the actual requests.
$sessionId string Session ID.
$userId mixed User ID to be sent to the server.

Public Methods

Method Description
__construct ( eZ\Publish\Core\REST\Client\HttpClient $innerClient, mixed $userId = 14 ) Creates a new Integration Test Authenticator.
request ( string $method, string $path, Message $message = null ) : Message Execute a HTTP request to the remote server.
setSession ( string $id ) Set the session ID to use.
setUserId ( mixed $userId ) Sets the user ID submitted to the server.

Method Details

__construct() public method

Creates a new Integration Test Authenticator.
public __construct ( eZ\Publish\Core\REST\Client\HttpClient $innerClient, mixed $userId = 14 )
$innerClient eZ\Publish\Core\REST\Client\HttpClient
$userId mixed

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

setSession() public method

Set the session ID to use.
public setSession ( string $id )
$id string

setUserId() public method

Sets the user ID submitted to the server.
public setUserId ( mixed $userId )
$userId mixed

Property Details

$innerClient protected property

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

$sessionId protected property

Session ID.
protected string $sessionId
return string

$userId protected property

User ID to be sent to the server.
protected mixed $userId
return mixed