pub struct TokenConfirmer { /* private fields */ }Expand description
A Confirmer backed by an access token — the third broker impl beside
CliApproveConfirmer/BiometricConfirmer. It lets the unattended consume
path funnel high entries through the same broker abstraction the
attended path uses: a valid, unexpired, package-bound token approves; an
invalid one denies. It never blocks and never prompts.
Implementations§
Source§impl TokenConfirmer
impl TokenConfirmer
Sourcepub fn new(
package: &Package,
payload: &PackagePayload,
token: &AccessToken,
clock: &dyn Clock,
) -> Self
pub fn new( package: &Package, payload: &PackagePayload, token: &AccessToken, clock: &dyn Clock, ) -> Self
Build a confirmer that approves iff token is valid for package/
payload at clock (see verify_token).
Trait Implementations§
Source§impl Confirmer for TokenConfirmer
impl Confirmer for TokenConfirmer
Source§fn confirm(&self, _req: &ConfirmRequest, _timeout: Duration) -> ConfirmOutcome
fn confirm(&self, _req: &ConfirmRequest, _timeout: Duration) -> ConfirmOutcome
Block until the request is resolved or
timeout elapses. A timeout fails
safe (the broker default is denial, §8).Auto Trait Implementations§
impl Freeze for TokenConfirmer
impl RefUnwindSafe for TokenConfirmer
impl Send for TokenConfirmer
impl Sync for TokenConfirmer
impl Unpin for TokenConfirmer
impl UnsafeUnpin for TokenConfirmer
impl UnwindSafe for TokenConfirmer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more