Class WebhookBodySigner

  • All Implemented Interfaces:
    com.atlassian.webhooks.WebhookRequestEnricher

    @Component
    public class WebhookBodySigner
    extends Object
    implements com.atlassian.webhooks.WebhookRequestEnricher
    Provides body signing to webhooks by signing via a HmacSHA256 algorithm. Only the contents of the body will be included in the digest. The headers, and URL are left out as they may change after this enricher has run. Signatures will only be added in the event that there is a 'secret' set against the configuration of the webhook.
    • Constructor Detail

      • WebhookBodySigner

        public WebhookBodySigner()
    • Method Detail

      • enrich

        public void enrich​(@Nonnull
                           com.atlassian.webhooks.WebhookInvocation webhookInvocation)
        Specified by:
        enrich in interface com.atlassian.webhooks.WebhookRequestEnricher
      • getWeight

        public int getWeight()
        Specified by:
        getWeight in interface com.atlassian.webhooks.WebhookRequestEnricher