private function createAuthenticationAdapter($params)
{
try {
$entity = $this->model->createAuthenticationAdapter($params);
} catch (\Exception $e) {
return new ApiProblemResponse(new ApiProblem($e->getCode(), $e->getMessage()));
}
$response = $this->getResponse();
$response->setStatusCode(201);
$response->getHeaders()->addHeaderLine('Location', $this->url()->fromRoute('zf-apigility/api/authentication', ['authentication_adapter' => $entity['name']]));
return $this->createEntity($entity);
}