You are here

public function ContentHubSubscription::regenerateSharedSecret in Acquia Content Hub 8

Regenerates the Subscription's Shared Secret.

Return value

bool|string The new shared secret if successful, FALSE otherwise.

File

src/ContentHubSubscription.php, line 214

Class

ContentHubSubscription
Handles operations on the Acquia Content Hub Subscription.

Namespace

Drupal\acquia_contenthub

Code

public function regenerateSharedSecret() {
  if ($response = $this->clientManager
    ->createRequest('regenerateSharedSecret')) {
    if (isset($response['success']) && $response['success'] == 1) {
      $this
        ->getSettings();
      return $this
        ->getSharedSecret();
    }
  }
  return FALSE;
}