Skip to main content

HttpsHandler

Struct HttpsHandler 

Source
pub struct HttpsHandler { /* private fields */ }
Expand description

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 — which, with no proof, means the “issuer” is an unverified string the sender chose. HttpsServer refuses that combination by default; see HttpsServerBuilder::require_attribution.

Implementations§

Source§

impl HttpsHandler

Source

pub fn new( local: impl Into<Option<String>>, peer: impl Into<Option<String>>, ) -> Self

Construct a handler for an exchange where the local party is local and the transport authenticated peer as the counterpart.

Source

pub fn local(&self) -> Option<&str>

The local party’s VID, if configured.

Source

pub fn peer(&self) -> Option<&str>

The authenticated peer’s VID, if any.

Trait Implementations§

Source§

impl Clone for HttpsHandler

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for HttpsHandler

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl TransportHandler for HttpsHandler

Source§

fn binding_uri(&self) -> &str

A stable identifier for this transport binding, suitable for logs and audit (SPEC.md §9.1, §9.2 — “A transport binding specification SHOULD identify itself by a stable URI”).
Source§

fn derive_parties(&self) -> TransportContext

Identities the transport authenticated for the inbound message under consideration. Read more
Source§

fn prepare_outbound<P>(&self, _doc: &mut TrustTask<P>)
where P: Serialize,

Prepare an outbound document for emission over this transport. Read more
Source§

fn resolve_parties<P>( &self, doc: &TrustTask<P>, ) -> Result<ResolvedParties, ConsistencyError>

Apply SPEC.md §4.8.1 precedence to produce the final ResolvedParties for an inbound document. Read more
Source§

fn reject<P>( &self, doc: &TrustTask<P>, id: impl Into<String>, reason: RejectReason, ) -> Option<TrustTask<ErrorPayload>>

Build a trust-task-error response for doc that satisfies the SPEC.md §8.1 routing rules — most importantly, the rule that under RejectReason::IdentityMismatch the error MUST address the transport-authenticated sender and MUST NOT address the contested in-band issuer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more