pub struct InMemoryTokenStore { /* private fields */ }Expand description
In-process token store. Useful for tests and as a shared cache across multiple strategy instances in the same process (e.g. a worker pool).
Internally stores the JSON-serialised form of the token wrapped in
Zeroizing so the buffer is wiped on overwrite and on store drop. The
SecretToken wrapped inside Token is
ZeroizeOnDrop, so we deliberately don’t clone
the in-memory Token value — round-tripping through serde gives us a
fresh SecretToken on each load without violating that invariant.
Implementations§
Trait Implementations§
Source§impl Default for InMemoryTokenStore
impl Default for InMemoryTokenStore
Source§impl TokenStore for InMemoryTokenStore
impl TokenStore for InMemoryTokenStore
Auto Trait Implementations§
impl !Freeze for InMemoryTokenStore
impl !RefUnwindSafe for InMemoryTokenStore
impl !UnwindSafe for InMemoryTokenStore
impl Send for InMemoryTokenStore
impl Sync for InMemoryTokenStore
impl Unpin for InMemoryTokenStore
impl UnsafeUnpin for InMemoryTokenStore
Blanket Implementations§
impl<T> AuthStrategyBounds for T
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
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more