public function checkAuthentication(\Docker\API\Model\AuthConfig $authConfig, $parameters = [], $fetch = self::FETCH_OBJECT)
{
$queryParam = new QueryParam();
$url = '/auth';
$url = $url . ('?' . $queryParam->buildQueryString($parameters));
$headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters));
$body = $this->serializer->serialize($authConfig, 'json');
$request = $this->messageFactory->createRequest('POST', $url, $headers, $body);
$response = $this->httpClient->sendRequest($request);
if (self::FETCH_OBJECT == $fetch) {
if ('200' == $response->getStatusCode()) {
return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\AuthResult', 'json');
}
}
return $response;
}