public function ContentHubSubscription::getSharedSecret in Acquia Content Hub 8
Returns the Subscription's Shared Secret, used for Webhook verification.
Return value
bool|string The shared secret, FALSE otherwise.
3 calls to ContentHubSubscription::getSharedSecret()
- ContentHubSubscription::regenerateSharedSecret in src/
ContentHubSubscription.php - Regenerates the Subscription's Shared Secret.
- ContentHubSubscription::setHmacAuthorization in src/
ContentHubSubscription.php - Wraps a request using HMAC authentication.
- ContentHubSubscription::updateSharedSecret in src/
ContentHubSubscription.php - Updates the locally stored shared secret.
File
- src/
ContentHubSubscription.php, line 191
Class
- ContentHubSubscription
- Handles operations on the Acquia Content Hub Subscription.
Namespace
Drupal\acquia_contenthubCode
public function getSharedSecret() {
if ($shared_secret = $this->state
->get('acquia_contenthub.shared_secret')) {
return $shared_secret;
}
else {
if ($this->settings) {
return $this->settings
->getSharedSecret();
}
else {
if ($settings = $this->clientManager
->createRequest('getSettings')) {
return $settings
->getSharedSecret();
}
return FALSE;
}
}
}