pub struct LysAgent { /* private fields */ }Expand description
Asks Lys’s agent pass route for this agent’s liminal pass.
Implementations§
Source§impl LysAgent
impl LysAgent
Sourcepub fn new(table: &LysTable, timeout: Duration) -> Result<Self, &'static str>
pub fn new(table: &LysTable, timeout: Duration) -> Result<Self, &'static str>
A pass source for table, every request bounded by timeout.
§Errors
Refuses, by a fixed sentence, an issuer that is not https (or http on
127.0.0.1 or localhost), an agent id that is not plain path text, and a
key path that is not absolute; without a key, names a missing run variable
or an agent that differs from LYS_AGENT.
Sourcepub fn pass_for(&self, audience: &str) -> Result<String, PassError>
pub fn pass_for(&self, audience: &str) -> Result<String, PassError>
This agent’s pass for audience: the held one while it is good for
more than RENEW_WITHIN_SECS on the signed route, or until expiry on
the run-pass route; otherwise a new one from Lys.
§Errors
Names why no pass could be had: an audience that is not plain text, the key, Lys unreachable, or Lys’s refusal by its own name.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for LysAgent
impl !RefUnwindSafe for LysAgent
impl !UnwindSafe for LysAgent
impl Send for LysAgent
impl Sync for LysAgent
impl Unpin for LysAgent
impl UnsafeUnpin for LysAgent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.