pub struct Standing { /* private fields */ }Expand description
An issuer route and its verifier, with no holder token retained here.
Implementations§
Source§impl Standing
impl Standing
Sourcepub fn new(
base: &str,
adapter: Arc<LysPassAdapter>,
handle: Handle,
limits: PeersConfig,
deadline: Duration,
) -> Result<Arc<Self>, CertificateRefusal>
pub fn new( base: &str, adapter: Arc<LysPassAdapter>, handle: Handle, limits: PeersConfig, deadline: Duration, ) -> Result<Arc<Self>, CertificateRefusal>
Builds from the trusted API base and the same verifier used for Connect. The positive deadline bounds one request, never an idle wait or retry.
§Errors
Invalid endpoint, bounds or HTTP client setup.
Sourcepub fn endpoint(&self, holder: &str) -> Result<Url, CertificateRefusal>
pub fn endpoint(&self, holder: &str) -> Result<Url, CertificateRefusal>
The exact issuer request path this holder must sign, prefix included.
§Errors
The holder is not a single safe route segment.
Sourcepub fn status_endpoint(&self) -> Result<Url, CertificateRefusal>
pub fn status_endpoint(&self) -> Result<Url, CertificateRefusal>
The existing MCP door that accepts a certified agent’s signed read.
§Errors
The configured issuer base cannot resolve its MCP door.
Sourcepub fn status_signature_path(endpoint: &Url) -> &str
pub fn status_signature_path(endpoint: &Url) -> &str
The signature path used by the issuer’s MCP verifier, which strips /api.
Sourcepub const fn body() -> &'static [u8] ⓘ
pub const fn body() -> &'static [u8] ⓘ
The issuer’s exact app-pass request body; it grants nothing by itself.
Sourcepub fn prove(
&self,
holder: &str,
machine: MachineIdentity,
der: &[u8],
header: &str,
now: u64,
) -> Result<StandingPass, CertificateRefusal>
pub fn prove( &self, holder: &str, machine: MachineIdentity, der: &[u8], header: &str, now: u64, ) -> Result<StandingPass, CertificateRefusal>
Checks the proof against the certified Noise key before forwarding it. Lys then checks that key against its non-withdrawn certificate keys.
§Errors
Bound, key/holder/time/signature mismatch, withdrawal, unavailable issuer, wrong audience/holder, invalid pass or an excessive standing lifetime.