You are here

public function HmacWrapper::__construct in Acquia Content Hub 8

HmacWrapper constructor.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.

File

src/Middleware/HmacWrapper.php, line 29

Class

HmacWrapper
Wrapper for HMAC.

Namespace

Drupal\acquia_contenthub\Middleware

Code

public function __construct(ConfigFactoryInterface $config_factory) {
  $configFactory = $config_factory;

  // Get the content hub config settings.
  $this->config = $configFactory
    ->get('acquia_contenthub.admin_settings');
  if (!$this->apiKey) {
    $this->apiKey = $this->config
      ->get('api_key');
  }
  if (!$this->secretKey) {
    $this->secretKey = $this->config
      ->get('secret_key');
  }
}