/** * public key temp control processes has been wrapped * @param array $params * @return mixed array | null * @throws Exception */ private function publicKeyTempProcessControler($params) { if ($this->isServicePkTempRequired) { /** * getting private key temp due to public key temp * @author Mustafa Zeynel Dağlı * @since 27/01/2016 version 0.3 */ if (isset($params['pktemp'])) { $resultSetTemp = $this->dalObject->getPrivateKeyTemp($params['pktemp']); } /** * if not get private temp key due to public temp key * forward to private not found * @author Mustafa Zeynel Dağlı * @since 27/01/2016 version 0.3 */ if (empty($resultSetTemp['resultSet'])) { $this->privateKeyTempNotFoundRedirect(); } /** * if service has to be secure then prepare hash for public and private temp keys * @author Mustafa Zeynel Dağlı * @since version 0.3 27/01/2016 */ if (!isset($resultSetTemp['resultSet'][0]['sf_private_key_value_temp'])) { throw new \Exception('SlimHmacProxy->restApiDefaultCall() method private temp key not found!!'); } if (!isset($params['pktemp'])) { throw new \Exception('SlimHmacProxy->restApiDefaultCall() method public temp key not found!!'); } else { $this->hmacObj->setPublicKey($params['pktemp']); } //$this->hmacObj->setPrivateKey('e249c439ed7697df2a4b045d97d4b9b7e1854c3ff8dd668c779013653913572e'); $this->hmacObj->setPrivateKey($resultSetTemp['resultSet'][0]['sf_private_key_value_temp']); $this->hmacObj->setRequestParams($this->getRequestParamsWithoutPublicKeyTemp()); $this->hmacObj->makeHmac(); //print_r($this->hmacObj); return $resultSetTemp; } else { return null; } }