1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
use Arc;
use async_trait;
use crateVerificationResult;
/// A captcha provider, as seen by the rest of the package.
///
/// Implement it to add a provider the package does not ship, then register it with
/// [`LaracaptchaServiceProvider::extend`](crate::LaracaptchaServiceProvider::extend) or
/// [`extend`](crate::extend), where the closure decides where the credentials come from.
///
/// A driver covers both halves of the flow: telling the widget how to render itself
/// ([`site_key`](Self::site_key), [`script_url`](Self::script_url),
/// [`response_field`](Self::response_field)) and checking the token the widget produces
/// ([`verify`](Self::verify)).
///
/// Implementations must fail closed. A driver that cannot reach its provider returns an
/// unsuccessful result, it does not panic and it never lets the request through by default.