pub struct VerifiedBinding { /* private fields */ }Expand description
A binding whose signature, pass, issuer, holder, audience, lifetime, grant log and ancestry were checked against one verified pass.
Implementations§
Source§impl VerifiedBinding
impl VerifiedBinding
Sourcepub fn verify(
binding: &str,
token: &str,
pass: &VerifiedPass,
keys: &KeySet,
log: &GrantLog,
) -> Result<Self, Error>
pub fn verify( binding: &str, token: &str, pass: &VerifiedPass, keys: &KeySet, log: &GrantLog, ) -> Result<Self, Error>
Verify binding as the binding of the pass token, already verified
as pass, on the grant log log the product’s stream reads.
§Errors
Refuses a binding whose encoding, header, signing key or signature
does not verify, or whose claims do not match this pass, grant log
and grants. An unsupported version or malformed dependency ancestry
is refused by the same checks as Self::verify_bound.
Sourcepub fn verify_bound(
binding: &str,
bound: &Bound<'_>,
keys: &KeySet,
log: &GrantLog,
) -> Result<Self, Error>
pub fn verify_bound( binding: &str, bound: &Bound<'_>, keys: &KeySet, log: &GrantLog, ) -> Result<Self, Error>
Verify binding as the binding of a pass bound describes: one a
registry-owned producer issued and verified by its own contract,
whose binding Lys judged (POST /grants/bindings).
§Errors
Refuses unreadable token encoding or claims, an unsupported header,
an unpublished signing key or an invalid signature. Binding refusals
name an unsupported version, a different pass or its issuer, holder,
audience or lifetime, or another grant log or epoch. Ancestry is
refused when a path does not begin at its grant, contains an empty
or repeated grant, repeats a dependency, or does not cover exactly
the grants bound names.
Sourcepub const fn claims(&self) -> &BindingClaims
pub const fn claims(&self) -> &BindingClaims
The verified claims.
Sourcepub const fn revision(&self) -> u64
pub const fn revision(&self) -> u64
The revision a product’s stream must stand at before admitting.
Sourcepub fn dependency(&self, grant: &str) -> Option<&Dependency>
pub fn dependency(&self, grant: &str) -> Option<&Dependency>
The dependency of the right resting on grant, as a decision of the
pass names it.