ngrok/config/
webhook_verification.rs

1use crate::internals::proto::{
2    SecretString,
3    WebhookVerification as WebhookProto,
4};
5
6/// Configuration for webhook verification.
7#[derive(Clone)]
8pub(crate) struct WebhookVerification {
9    /// The webhook provider
10    pub(crate) provider: String,
11    /// The secret for verifying webhooks from this provider.
12    pub(crate) secret: SecretString,
13}
14
15impl WebhookVerification {}
16
17// transform into the wire protocol format
18impl From<WebhookVerification> for WebhookProto {
19    fn from(wv: WebhookVerification) -> Self {
20        WebhookProto {
21            provider: wv.provider,
22            secret: wv.secret,
23            sealed_secret: vec![], // unused in this context
24        }
25    }
26}