Skip to main content

DecisionInput

Struct DecisionInput 

Source
pub struct DecisionInput {
Show 18 fields pub credential: Value, pub now: String, pub clock_skew_seconds: i64, pub public_key: Option<KeyEntry>, pub mldsa44_public_key: Option<Option<Vec<u8>>>, pub trusted_keys: BTreeMap<String, KeyEntry>, pub resolved_keys: BTreeMap<String, KeyEntry>, pub mldsa44_keys: BTreeMap<String, Vec<u8>>, pub documents: BTreeMap<String, Value>, pub trusted_roots: Option<TrustedRoots>, pub require_post_quantum: bool, pub expected_resource: Option<String>, pub check_status: bool, pub status_lists: Map<String, Value>, pub max_depth: Option<usize>, pub max_replay_window_seconds: f64, pub allowed_issuers: Option<Vec<String>>, pub chain_required_outside_roots: bool,
}
Expand description

Everything one verification decision needs. The host fetched every document and status list; nothing here is fetched.

Fields§

§credential: Value

The credential as the host received it (an object; anything else is refused as “the credential is not a JSON object”).

§now: String

The verifier’s clock, a protocol time.

§clock_skew_seconds: i64

Allowed clock drift, 0 to 120 seconds.

§public_key: Option<KeyEntry>

The issuer’s key handed over by the caller (offline verification).

§mldsa44_public_key: Option<Option<Vec<u8>>>

The issuer’s ML-DSA-44 key handed over by the caller: Some(None) is a key that is not a 1312-byte ML-DSA-44 key. Supplying one requires the post-quantum proof.

§trusted_keys: BTreeMap<String, KeyEntry>

The caller’s trusted keys by DID (the reference’s trusted_keys): for a DID listed here, this is the only key.

§resolved_keys: BTreeMap<String, KeyEntry>

The answers of the caller’s key resolver, by DID (a resolver that answered nothing is left out). Asked after the trusted keys.

§mldsa44_keys: BTreeMap<String, Vec<u8>>

ML-DSA-44 keys (1312 bytes) by DID, from the caller’s ML-DSA-44 key resolver. Asked first for every signer.

§documents: BTreeMap<String, Value>

DID documents the host fetched, by DID: did:web documents, and the latest verified state of did:webvh logs. A DID whose fetch failed is left out.

§trusted_roots: Option<TrustedRoots>

The trusted starting points for a delegation chain. None (or an empty list) means none are known, so a chained credential is refused.

§require_post_quantum: bool

Require the post-quantum proof on the credential and every grant.

§expected_resource: Option<String>

When given, intent.resource must equal it.

§check_status: bool

Check credentialStatus (the reference’s default is true).

§status_lists: Map<String, Value>

The status list credentials the host fetched, by URL. A URL missing here is a list that could not be fetched (status_unavailable).

§max_depth: Option<usize>

An explicit most links a delegation chain may have.

§max_replay_window_seconds: f64

Credentials valid this long or less are single use (seconds, > 0).

§allowed_issuers: Option<Vec<String>>

When given, only these issuers are accepted (a verifier that requires a trusted issuer).

§chain_required_outside_roots: bool

With trusted roots named, refuse a credential without a delegation chain unless a root issued it (REASON_CHAIN_REQUIRED), so leaving the chain off never steps outside a grant. The reference applies it when the caller (or a verifier object) named the roots, and not for roots read from VOUCH_TRUSTED_ROOTS or the saved list.

Implementations§

Source§

impl DecisionInput

Source

pub fn new(credential: Value, now: impl Into<String>) -> Self

A decision request with the reference’s defaults: 30 seconds of skew, status checked, a 12-hour replay window, nothing trusted and nothing fetched.

Trait Implementations§

Source§

impl Clone for DecisionInput

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 DecisionInput

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Forget for DecisionInput

§

impl Freeze for DecisionInput

§

impl Move for DecisionInput

§

impl RefUnwindSafe for DecisionInput

§

impl Send for DecisionInput
where RawVecInner: Send, RawTable<usize>: Send, NodeRef<Owned, String, KeyEntry, LeafOrInternal>: Send, BoxRaw<(String, KeyEntry)>: Send, NodeRef<Owned, String, Vec<u8>, LeafOrInternal>: Send, BoxRaw<(String, Vec<u8>)>: Send, NodeRef<Owned, String, Value, LeafOrInternal>: Send, BoxRaw<(String, Value)>: Send,

§

impl Sync for DecisionInput
where RawVecInner: Sync, RawTable<usize>: Sync, NodeRef<Owned, String, KeyEntry, LeafOrInternal>: Sync, BoxRaw<(String, KeyEntry)>: Sync, NodeRef<Owned, String, Vec<u8>, LeafOrInternal>: Sync, BoxRaw<(String, Vec<u8>)>: Sync, NodeRef<Owned, String, Value, LeafOrInternal>: Sync, BoxRaw<(String, Value)>: Sync,

§

impl Unpin for DecisionInput
where *const u8 is !null: Unpin, *const LeafNode<String, KeyEntry> is !null: Unpin, Box<(String, KeyEntry)>: Unpin, *const LeafNode<String, Vec<u8>> is !null: Unpin, Box<(String, Vec<u8>)>: Unpin, *const LeafNode<String, Value> is !null: Unpin, Box<(String, Value)>: Unpin,

§

impl UnsafeUnpin for DecisionInput

§

impl UnwindSafe for DecisionInput

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, 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> 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.