Class WebhookBodySigner
- java.lang.Object
-
- com.atlassian.confluence.internal.webhooks.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.
-
-
Field Summary
Fields Modifier and Type Field Description static StringSECRET_KEY
-
Constructor Summary
Constructors Constructor Description WebhookBodySigner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidenrich(com.atlassian.webhooks.WebhookInvocation webhookInvocation)intgetWeight()
-
-
-
Field Detail
-
SECRET_KEY
public static final String SECRET_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
enrich
public void enrich(@Nonnull com.atlassian.webhooks.WebhookInvocation webhookInvocation)- Specified by:
enrichin interfacecom.atlassian.webhooks.WebhookRequestEnricher
-
getWeight
public int getWeight()
- Specified by:
getWeightin interfacecom.atlassian.webhooks.WebhookRequestEnricher
-
-