Skip to main content

StandingVerifier

Struct StandingVerifier 

Source
pub struct StandingVerifier<Rd> { /* private fields */ }
Expand description

The edge facade for standing node bindings: trust, revocation replica and supersession ledger for one issuer. Like EdgeVerifier it holds no minter.

Implementations§

Source§

impl<Rd> StandingVerifier<Rd>
where Rd: RevocationReader,

Source

pub fn new(trust: IssuerTrust, revoked: Rd) -> StandingVerifier<Rd>

A verifier with an empty ledger; import a persisted one through ledger after a restart.

Source

pub fn trust(&self) -> &IssuerTrust

Source

pub fn revocations(&self) -> &Rd

Source

pub fn ledger(&self) -> &BindingLedger

Source

pub async fn adopt(&self, token: &str) -> Result<StandingBinding, VerifyError>

Verify a binding that arrived without a peer — by gossip, or the edge’s own persisted one at boot — and record its seq, so it supersedes older bindings for its device. Checks the signature only: whether the binding is revoked or names this peer does not change that the issuer minted it.

Source

pub async fn verify_standing_at( &self, token: &str, presented: &PeerKey, now: i64, ) -> Result<VerifiedStanding, StandingError>

Admit token as a standing binding for the peer that proved presented in its handshake.

In order, cheapest and most local first: signature (recording the binding’s seq in the ledger), peer key, supersession, then the revocation reads (jti, then device) — the only I/O. now decides VerifiedStanding::lease and nothing else: there is no expiry.

Trait Implementations§

Source§

impl<Rd> Debug for StandingVerifier<Rd>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<Rd> !Freeze for StandingVerifier<Rd>

§

impl<Rd> !RefUnwindSafe for StandingVerifier<Rd>

§

impl<Rd> !UnwindSafe for StandingVerifier<Rd>

§

impl<Rd> Send for StandingVerifier<Rd>
where Rd: Send,

§

impl<Rd> Sync for StandingVerifier<Rd>
where Rd: Sync,

§

impl<Rd> Unpin for StandingVerifier<Rd>
where Rd: Unpin,

§

impl<Rd> UnsafeUnpin for StandingVerifier<Rd>
where Rd: UnsafeUnpin,

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Same for T

Source§

type Output = T

Should always be Self
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