Class SignedCloudEventExtensions
- Assembly
- Savvyio.EventDriven.Messaging.dll
Extension methods for the ICloudEvent<T> interface.
public static class SignedCloudEventExtensions
- Inheritance
-
ObjectSignedCloudEventExtensions
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
IMarshallerThe 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.