lightspark_remote_signing/
validation.rs

1// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
3pub trait Validation: Send + Sync {
4    /// This function should return true if the webhook should be signed.
5    ///
6    /// Arguments:
7    /// * `webhook` - The webhook event json serialized string to be validated.
8    fn should_sign(&self, webhook: String) -> bool;
9}
10
11pub struct PositiveValidator;
12
13impl Validation for PositiveValidator {
14    fn should_sign(&self, _: String) -> bool {
15        true
16    }
17}