hcaptcha 3.2.1

hCaptcha client response verification. Validate the hCaptcha response submitted from to your server from the client.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// SPDX-FileCopyrightText: 2022 jerusdp
//
// SPDX-License-Identifier: MIT OR Apache-2.0

//! Hcaptcha Trait
use crate::{Error, Response};
// use async_trait::async_trait;
use std::{future::Future, pin::Pin};

/// Hcaptcha trait
pub trait Hcaptcha {
    /// valid response function
    fn valid_response(
        &self,
        secret: &str,
        uri: Option<String>,
    ) -> Pin<Box<dyn Future<Output = Result<Response, Error>>>>;
}