You are here

class WebhookMismatchSignatureException in Webhooks 8

Class Webhook Mismatch Signature Exception.

@package Drupal\webhooks\Exception

Hierarchy

Expanded class hierarchy of WebhookMismatchSignatureException

2 files declare their use of WebhookMismatchSignatureException
Webhook.php in src/Webhook.php
WebhookController.php in src/Controller/WebhookController.php

File

src/Exception/WebhookMismatchSignatureException.php, line 10

Namespace

Drupal\webhooks\Exception
View source
class WebhookMismatchSignatureException extends \Exception {

  /**
   * MismatchSignatureException constructor.
   *
   * @param string $signature_received
   *   The received signature.
   * @param string $signature_generated
   *   The generated signature.
   * @param string $payload
   *   The webhook payload.
   */
  public function __construct($signature_received, $signature_generated, $payload = '') {
    $message = sprintf('The received signature "%s" does not match the generated signature "%s". Payload: "%s"', $signature_received, $signature_generated, $payload);
    parent::__construct($message);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
WebhookMismatchSignatureException::__construct public function MismatchSignatureException constructor.