Skip to main content

RequestReplay

Struct RequestReplay 

Source
pub struct RequestReplay<'a> {
    pub seen_nonces: &'a mut HashSet<String>,
    pub max_age_seconds: i64,
    pub clock_skew_seconds: i64,
    pub trusted_operators: Option<&'a HashSet<String>>,
}
Expand description

Replay limits for authorize_access: the request may be no older than max_age_seconds and not from the future (both with clock_skew_seconds), and its nonce must not be in seen_nonces (it is added when access is allowed).

Fields§

§seen_nonces: &'a mut HashSet<String>§max_age_seconds: i64§clock_skew_seconds: i64§trusted_operators: Option<&'a HashSet<String>>

With no operator key, the grant verifies only when its did:key operator is in this non-empty set.

Implementations§

Source§

impl<'a> RequestReplay<'a>

Source

pub fn new(seen_nonces: &'a mut HashSet<String>) -> Self

The default limits (60 s age, 30 s skew) over seen_nonces.

Auto Trait Implementations§

§

impl<'a> !UnwindSafe for RequestReplay<'a>

§

impl<'a> Forget for RequestReplay<'a>

§

impl<'a> Freeze for RequestReplay<'a>
where &'a mut HashSet<String>: Freeze, &'a HashSet<String>: Freeze,

§

impl<'a> Move for RequestReplay<'a>

§

impl<'a> RefUnwindSafe for RequestReplay<'a>

§

impl<'a> Send for RequestReplay<'a>
where RawTable<(String, ())>: Send, &'a HashSet<String>: Send,

§

impl<'a> Sync for RequestReplay<'a>
where RawTable<(String, ())>: Sync,

§

impl<'a> Unpin for RequestReplay<'a>
where &'a mut HashSet<String>: Unpin, &'a HashSet<String>: Unpin,

§

impl<'a> UnsafeUnpin for RequestReplay<'a>

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