You are here

public function ContentHubWebhookController::validateWebhookSignature in Acquia Content Hub 8.2

Same name and namespace in other branches
  1. 8 src/Controller/ContentHubWebhookController.php \Drupal\acquia_contenthub\Controller\ContentHubWebhookController::validateWebhookSignature()

Validates a webhook signature.

Parameters

\Symfony\Component\HttpFoundation\Request $request: The request.

Return value

bool|\Acquia\Hmac\KeyInterface TRUE if signature verification passes, FALSE otherwise.

1 call to ContentHubWebhookController::validateWebhookSignature()
ContentHubWebhookController::receiveWebhook in src/Controller/ContentHubWebhookController.php
Process an incoming webhook from the ContentHub Service.

File

src/Controller/ContentHubWebhookController.php, line 117

Class

ContentHubWebhookController
Controller for ContentHub webhooks.

Namespace

Drupal\acquia_contenthub\Controller

Code

public function validateWebhookSignature(Request $request) {
  return $this->clientFactory
    ->authenticate($request);
}