Table of Contents

Class SignedCloudEventExtensions

Namespace
Savvyio.EventDriven.Messaging.CloudEvents.Cryptography
Assembly
Savvyio.EventDriven.Messaging.dll

Extension methods for the ICloudEvent<T> interface.

public static class SignedCloudEventExtensions
Inheritance
Object
SignedCloudEventExtensions

Methods

CheckCloudEventSignature<T>(ISignedCloudEvent<T>, IMarshaller, Action<SignedMessageOptions>)

Verifies the digital signature of the ISignedCloudEvent<T> message.

public static void CheckCloudEventSignature<T>(this ISignedCloudEvent<T> cloudEvent, IMarshaller marshaller, Action<SignedMessageOptions> setup)
    where T : IIntegrationEvent

Parameters

cloudEvent ISignedCloudEvent<T>

The IRequest message to cryptographically verify.

marshaller IMarshaller

The IMarshaller that is used when converting the cloudEvent into an ISignedCloudEvent<T>.

setup Action<SignedMessageOptions>

The SignedMessageOptions that must be configured.

Type Parameters

T

The type of the payload constraint to the IRequest interface.

Remarks

This method throws an System.ArgumentOutOfRangeException if the verification of the digital signature fails.

Exceptions

System.ArgumentNullException

cloudEvent cannot be null -or- marshaller cannot be null.

ArgumentException

setup failed to configure an instance of SignedMessageOptions in a valid state.

System.ArgumentOutOfRangeException

cloudEvent signature did not match the cryptographically calculated value.