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
60
61
62
63
64
65
66
67
68
69
70
//! The HTTPS-binding [`HttpsHandler`].
//!
//! Per SPEC.md §9.2, each transport binding exposes its identity-resolution
//! and outbound-preparation logic as a [`TransportHandler`]. The HTTPS
//! handler reports the authenticated peer (from the bearer token, on the
//! server side; from the configured server VID, on the client side) and
//! lets the framework apply the §4.8.1 precedence rule unchanged.
use ;
/// Stable identifier for the HTTPS binding, per SPEC.md §9.2.
pub const BINDING_URI: &str = "https://trusttasks.org/binding/https/0.1";
/// A [`TransportHandler`] for a single HTTPS exchange.
///
/// Constructed per-request on the server (`local` = the server's own VID,
/// `peer` = the bearer-authenticated sender) and per-instance on the
/// client (`local` = the client's own VID, `peer` = the configured server
/// VID).
///
/// Either side can be `None`:
///
/// * `local = None` — the consumer chooses not to assert its identity to
/// the framework's audience-binding rules. Allowed for transports that
/// handle recipient-identity out-of-band.
/// * `peer = None` — the transport authenticated nothing (no bearer header,
/// or an unrecognised token). The framework then falls back entirely to
/// the document's in-band `issuer` plus any `proof` it carries.