ZF\Apigility\Admin\Controller\AuthenticationController::updateAuthenticationMap PHP Method

updateAuthenticationMap() private method

The authentication map maps between the given authentication adapter and the selected module/version pair.
private updateAuthenticationMap ( array $params, string $module, string | integer $version ) : ZF\ContentNegotiation\ViewModel | ZF\ApiProblem\ApiProblemResponse
$params array
$module string
$version string | integer
return ZF\ContentNegotiation\ViewModel | ZF\ApiProblem\ApiProblemResponse
    private function updateAuthenticationMap($params, $module, $version)
    {
        if (!isset($params['authentication'])) {
            return new ApiProblemResponse(new ApiProblem(404, 'No authentication adapter found'));
        }
        try {
            $this->model->saveAuthenticationMap($params['authentication'], $module, $version);
        } catch (Exception\InvalidArgumentException $e) {
            return new ApiProblemResponse(new ApiProblem($e->getCode(), $e->getMessage()));
        }
        return $this->createAuthenticationMapResult($params['authentication']);
    }